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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to