summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2016-10-09 23:49:54 +0000
committerbluhm <bluhm@openbsd.org>2016-10-09 23:49:54 +0000
commit0aa716783018455d0b5fbe5bac105624a4fe316c (patch)
tree380bf2341714428bc569fdab8d7ef84701f02b6a /sys/msdosfs
parentAdd psci(4) a driver for the reset and power down portion of the (diff)
downloadwireguard-openbsd-0aa716783018455d0b5fbe5bac105624a4fe316c.tar.xz
wireguard-openbsd-0aa716783018455d0b5fbe5bac105624a4fe316c.zip
Do not check the SecPerTrack field of the BPB when mounting a MSDOS
file system. In modern images the field is not set properly and the value is not used anyway. FreeBSD has removed the check already in 2008. From Alexander von Gernler; OK krw@
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 152e4260f7d..023ab7b6653 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.81 2016/09/28 18:49:11 jca Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.82 2016/10/09 23:49:54 bluhm Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -323,7 +323,7 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p,
/* Determine the number of DEV_BSIZE blocks in a MSDOSFS sector */
pmp->pm_BlkPerSec = pmp->pm_BytesPerSec / DEV_BSIZE;
- if (!pmp->pm_BytesPerSec || !SecPerClust || pmp->pm_SecPerTrack > 64) {
+ if (!pmp->pm_BytesPerSec || !SecPerClust) {
error = EFTYPE;
goto error_exit;
}