summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-02-21 03:19:46 +0000
committermarcel <marcel@FreeBSD.org>2008-02-21 03:19:46 +0000
commitc8e1e08fd3341dfcf79081e9256058e4341e89ec (patch)
tree825e8bde694880575e6ab44ff630811be947341d /sys/fs/msdosfs
parentad24b435ad1a42054be4a387fc125edb23aa4b6e (diff)
downloadFreeBSD-src-c8e1e08fd3341dfcf79081e9256058e4341e89ec.zip
FreeBSD-src-c8e1e08fd3341dfcf79081e9256058e4341e89ec.tar.gz
Don't check the bpbSecPerTrack and bpbHeads fields of the BPB.
They are typically 0 on new ia64 systems. Since we don't use either field, there's no harm in not checking.
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 6834381..9bba037 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -508,14 +508,13 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td)
/* calculate the ratio of sector size to DEV_BSIZE */
pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE;
- /* XXX - We should probably check more values here */
- if (!pmp->pm_BytesPerSec || !SecPerClust
- || !pmp->pm_Heads
-#ifdef PC98
- || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) {
-#else
- || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 63) {
-#endif
+ /*
+ * We don't check pm_Heads nor pm_SecPerTrack, because
+ * these may not be set for EFI file systems. We don't
+ * use these anyway, so we're unaffected if they are
+ * invalid.
+ */
+ if (!pmp->pm_BytesPerSec || !SecPerClust) {
error = EINVAL;
goto error_exit;
}
OpenPOWER on IntegriCloud