Legally acquire a major number for mfs.
This commit is contained in:
parent
a4e20207f5
commit
a70a9e81f8
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.196 1999/05/12 19:06:40 peter Exp $
|
||||
* $Id: vfs_subr.c,v 1.197 1999/05/14 01:29:21 mckusick Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1175,9 +1175,7 @@ bdevvp(dev, vpp)
|
||||
struct vnode *nvp;
|
||||
int error;
|
||||
|
||||
/* XXX 255 is for mfs. */
|
||||
if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev ||
|
||||
bdevsw(dev) == NULL))) {
|
||||
if (dev == NODEV || major(dev) >= nblkdev || bdevsw(dev) == NULL) {
|
||||
*vpp = NULLVP;
|
||||
return (ENXIO);
|
||||
}
|
||||
@ -1279,7 +1277,6 @@ checkalias(nvp, nvp_rdev, mp)
|
||||
|
||||
if (nvp->v_type == VBLK && rmaj < nblkdev) {
|
||||
if (bdevsw(dev) && bdevsw(dev)->d_parms)
|
||||
|
||||
(*bdevsw(dev)->d_parms)(dev, sinfo, DPARM_GET);
|
||||
} else if (nvp->v_type == VCHR && rmaj < nchrdev) {
|
||||
if (devsw(dev) && devsw(dev)->d_parms)
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.196 1999/05/12 19:06:40 peter Exp $
|
||||
* $Id: vfs_subr.c,v 1.197 1999/05/14 01:29:21 mckusick Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1175,9 +1175,7 @@ bdevvp(dev, vpp)
|
||||
struct vnode *nvp;
|
||||
int error;
|
||||
|
||||
/* XXX 255 is for mfs. */
|
||||
if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev ||
|
||||
bdevsw(dev) == NULL))) {
|
||||
if (dev == NODEV || major(dev) >= nblkdev || bdevsw(dev) == NULL) {
|
||||
*vpp = NULLVP;
|
||||
return (ENXIO);
|
||||
}
|
||||
@ -1279,7 +1277,6 @@ checkalias(nvp, nvp_rdev, mp)
|
||||
|
||||
if (nvp->v_type == VBLK && rmaj < nblkdev) {
|
||||
if (bdevsw(dev) && bdevsw(dev)->d_parms)
|
||||
|
||||
(*bdevsw(dev)->d_parms)(dev, sinfo, DPARM_GET);
|
||||
} else if (nvp->v_type == VCHR && rmaj < nchrdev) {
|
||||
if (devsw(dev) && devsw(dev)->d_parms)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
|
||||
* $Id: mfs_vfsops.c,v 1.61 1999/05/10 17:12:45 peter Exp $
|
||||
* $Id: mfs_vfsops.c,v 1.62 1999/05/11 19:55:03 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ static caddr_t mfs_rootbase; /* address of mini-root in kernel virtual memory */
|
||||
static u_long mfs_rootsize; /* size of mini-root in bytes */
|
||||
#endif
|
||||
|
||||
static int mfs_minor; /* used for building internal dev_t */
|
||||
static int mfs_minor; /* used for building internal dev_t */
|
||||
|
||||
extern vop_t **mfs_vnodeop_p;
|
||||
|
||||
@ -453,6 +453,8 @@ mfs_statfs(mp, sbp, p)
|
||||
return (error);
|
||||
}
|
||||
|
||||
static struct cdevsw mfs_cdevsw = {};
|
||||
|
||||
/*
|
||||
* Memory based filesystem initialization.
|
||||
*/
|
||||
@ -460,5 +462,8 @@ static int
|
||||
mfs_init(vfsp)
|
||||
struct vfsconf *vfsp;
|
||||
{
|
||||
dev_t dev = NODEV;
|
||||
cdevsw_add(&dev, &mfs_cdevsw, NULL);
|
||||
cdevsw_add_generic(255, major(dev), &mfs_cdevsw);
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user