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)
This commit is contained in:
Pedro F. Giffuni 2016-05-18 00:33:08 +00:00
parent 13e535d4ea
commit 7cdd755dfd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=300099

View File

@ -221,7 +221,7 @@ readboot(int dosfs, struct bootblock *boot)
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;