From owner-svn-src-head@freebsd.org Fri Jun 22 16:18:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C7D81020238; Fri, 22 Jun 2018 16:18:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF130760F3; Fri, 22 Jun 2018 16:18:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC3DC22FD7; Fri, 22 Jun 2018 16:18:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MGIJTx043987; Fri, 22 Jun 2018 16:18:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MGIJpM043986; Fri, 22 Jun 2018 16:18:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201806221618.w5MGIJpM043986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Jun 2018 16:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335559 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 335559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 16:18:20 -0000 Author: delphij Date: Fri Jun 22 16:18:19 2018 New Revision: 335559 URL: https://svnweb.freebsd.org/changeset/base/335559 Log: Don't bail out when we find primary and secondary bootblocks miscompare. We do not have code to fix this situation, and the mismatch does not prevent the kernel driver from consuming the file system, and some factory formatted SD cards seem to have a garbage backup block. This makes the code match to its comments (replacing pfatal with pwarn). Inspired by: NetBSD r1.13 Inspired by: https://android.googlesource.com/platform/external/fsck_msdos/+/b47b16353f3db228711dded9f7c975b820059ddc MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Fri Jun 22 15:00:00 2018 (r335558) +++ head/sbin/fsck_msdosfs/boot.c Fri Jun 22 16:18:19 2018 (r335559) @@ -167,11 +167,11 @@ readboot(int dosfs, struct bootblock *boot) * requirement is suspect. For now, just * print out useful information and continue. */ - pfatal("backup (block %d) mismatch with primary bootblock:\n", + pwarn("backup (block %d) mismatch with primary bootblock:\n", boot->bpbBackup); for (i = 11; i < 11 + 90; i++) { if (block[i] != backup[i]) - pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", + pwarn("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", i, block[i], backup[i]); } }