svn commit: r300099 - stable/10/sbin/fsck_msdosfs

Pedro F. Giffuni pfg at FreeBSD.org
Wed May 18 00:33:10 UTC 2016


Author: pfg
Date: Wed May 18 00:33:08 2016
New Revision: 300099
URL: https://svnweb.freebsd.org/changeset/base/300099

Log:
  MFC r299089:
  fsck_msdosfs: Adjust a check.
  
  The on-disk FAT array does not include anything before CLUST_FIRST,
  compensate in size check.
  
  Obtained from:	NetBSD (CVS Rev. 1.20)

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

Modified: stable/10/sbin/fsck_msdosfs/boot.c
==============================================================================
--- stable/10/sbin/fsck_msdosfs/boot.c	Wed May 18 00:22:52 2016	(r300098)
+++ stable/10/sbin/fsck_msdosfs/boot.c	Wed May 18 00:33:08 2016	(r300099)
@@ -221,7 +221,7 @@ readboot(int dosfs, struct bootblock *bo
 		break;
 	}
 
-	if (boot->NumFatEntries < boot->NumClusters) {
+	if (boot->NumFatEntries < boot->NumClusters - CLUST_FIRST) {
 		pfatal("FAT size too small, %u entries won't fit into %u sectors\n",
 		       boot->NumClusters, boot->FATsecs);
 		return FSFATAL;


More information about the svn-src-stable mailing list