summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-02-01 18:01:03 +0000
committerkib <kib@FreeBSD.org>2013-02-01 18:01:03 +0000
commitad92b9afc4f7ec122f9438ac64b58c2926a6a6a4 (patch)
tree7cd7ffaa7d444a819242537b5b9fa679bdbe2041
parent31d95b4c31c05e5396bda46553fafdfbb46bdbf7 (diff)
downloadFreeBSD-src-ad92b9afc4f7ec122f9438ac64b58c2926a6a6a4.zip
FreeBSD-src-ad92b9afc4f7ec122f9438ac64b58c2926a6a6a4.tar.gz
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
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index e99fff3..a209970 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -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
OpenPOWER on IntegriCloud