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:
Pedro F. Giffuni 2016-05-04 22:27:22 +00:00
parent 79ccc589d2
commit dd3f00cbaf

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;