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)
MFC after:	2 weeks
This commit is contained in:
pfg 2016-05-04 22:27:22 +00:00
parent fab5cc8f2f
commit d0f63ec230

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;