Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 06:02:46 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r336120 - stable/11/sbin/fsck_msdosfs
Message-ID:  <201807090602.w6962kfs084097@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Mon Jul  9 06:02:45 2018
New Revision: 336120
URL: https://svnweb.freebsd.org/changeset/base/336120

Log:
  MFC r335559:
  
  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

Modified:
  stable/11/sbin/fsck_msdosfs/boot.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/fsck_msdosfs/boot.c
==============================================================================
--- stable/11/sbin/fsck_msdosfs/boot.c	Mon Jul  9 05:56:13 2018	(r336119)
+++ stable/11/sbin/fsck_msdosfs/boot.c	Mon Jul  9 06:02:45 2018	(r336120)
@@ -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]);
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807090602.w6962kfs084097>