diff options
author | bde <bde@FreeBSD.org> | 1998-10-29 11:50:32 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-10-29 11:50:32 +0000 |
commit | 9a84781068032b4b52586ff65ba49300f5d2a64e (patch) | |
tree | d61d5b2ef0c33ca6d194f3432dfa0ae13fc8c34b /sys/kern | |
parent | 042df0ac22d048ed5886fc6b52729ec9aba91aa9 (diff) | |
download | FreeBSD-src-9a84781068032b4b52586ff65ba49300f5d2a64e.zip FreeBSD-src-9a84781068032b4b52586ff65ba49300f5d2a64e.tar.gz |
Oops, rev.1.167 made the device number checking in bdevvp() too strict
for mfs root mounts. Don't require major 255 to be in bdevsw[].
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_export.c | 7 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index fad388a..6e866b5 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $ + * $Id: vfs_subr.c,v 1.170 1998/10/29 09:51:27 peter Exp $ */ /* @@ -1112,8 +1112,9 @@ bdevvp(dev, vpp) struct vnode *nvp; int error; - if (dev == NODEV || major(dev) >= nblkdev || - bdevsw[major(dev)] == NULL) { + /* XXX 255 is for mfs. */ + if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev || + bdevsw[major(dev)] == NULL))) { *vpp = NULLVP; return (ENXIO); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index fad388a..6e866b5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $ + * $Id: vfs_subr.c,v 1.170 1998/10/29 09:51:27 peter Exp $ */ /* @@ -1112,8 +1112,9 @@ bdevvp(dev, vpp) struct vnode *nvp; int error; - if (dev == NODEV || major(dev) >= nblkdev || - bdevsw[major(dev)] == NULL) { + /* XXX 255 is for mfs. */ + if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev || + bdevsw[major(dev)] == NULL))) { *vpp = NULLVP; return (ENXIO); } |