summaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_vfsops.c
diff options
context:
space:
mode:
authorNikolay Sturm <sturm@cvs.openbsd.org>2006-07-19 15:48:07 +0000
committerNikolay Sturm <sturm@cvs.openbsd.org>2006-07-19 15:48:07 +0000
commit14df8446f65369336dbcb8e6e7069a024b3f3fe5 (patch)
treee66412838716eaca7f29bf953eb3eaa7b091b9d9 /sys/msdosfs/msdosfs_vfsops.c
parente38190ecbb8c7b2735a794e2595eaa66928fd8c0 (diff)
from FreeBSD:
Don't reject FAT file systems with a number of "Heads" greater than 255; USB keychains exist that use 256 as the number of heads. This check has also been removed in Darwin (along with most of the other head/sector sanity checks). this fixes pr 4988, ok pedro
Diffstat (limited to 'sys/msdosfs/msdosfs_vfsops.c')
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 1af07051b51..1bf90685d14 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.36 2005/03/02 00:46:10 tom Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.37 2006/07/19 15:48:06 sturm Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -356,8 +356,8 @@ msdosfs_mountfs(devvp, mp, p, argp)
if (!(argp->flags & MSDOSFSMNT_GEMDOSFS)) {
/* XXX - We should probably check more values here */
- if (!pmp->pm_BytesPerSec || !SecPerClust
- || pmp->pm_Heads > 255 || pmp->pm_SecPerTrack > 63) {
+ if (!pmp->pm_BytesPerSec || !SecPerClust || !pmp->pm_Heads
+ || pmp->pm_SecPerTrack > 63) {
error = EFTYPE;
goto error_exit;
}