The mountmsdosfs() function had an insane sanity test, remove it.
Trying FAT32 on a small partition failed to mount because pmp->pm_Sectors was nonzero. Normally, FAT32 file systems are so large that the 16-bit pm_Sectors can't hold the size. This is indicated by setting it to 0 and using only pm_HugeSectors. But at least old versions of newfs_msdos use the 16-bit field if possible, and msdosfs supports this except for breaking its own support in the sanity check. This is quite different from the handling of pm_FATsecs -- now the 16-bit value is always ignored for FAT32 except for checking that it is 0, and newfs_msdos doesn't use the 16-bit value for FAT32. Submitted by: bde MFC after: 1 week
This commit is contained in:
parent
a26b949f2d
commit
48efa33b49
@ -553,8 +553,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp)
|
||||
}
|
||||
|
||||
if (pmp->pm_RootDirEnts == 0) {
|
||||
if (pmp->pm_Sectors
|
||||
|| pmp->pm_FATsecs
|
||||
if (pmp->pm_FATsecs
|
||||
|| getushort(b710->bpbFSVers)) {
|
||||
error = EINVAL;
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user