Only use the special bdevvp() for DEVFS if DEVFS_ROOT is defined. This
makes option DEVFS safe to use again (although mounting devfs is unsafe).
This commit is contained in:
parent
07baf622f9
commit
63ae415aca
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
|
||||
* $Id: vfs_subr.c,v 1.55 1996/07/12 07:41:34 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.56 1996/07/24 21:21:43 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -672,7 +672,7 @@ reassignbuf(bp, newvp)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DEVFS
|
||||
#ifndef DEVFS_ROOT
|
||||
/*
|
||||
* Create a vnode for a block device.
|
||||
* Used for root filesystem, argdev, and swap areas.
|
||||
@ -703,8 +703,8 @@ bdevvp(dev, vpp)
|
||||
*vpp = vp;
|
||||
return (0);
|
||||
}
|
||||
#endif /* !DEVFS_ROOT */
|
||||
|
||||
#endif /* !DEVFS */
|
||||
/*
|
||||
* Check to see if the new vnode represents a special device
|
||||
* for which we already have a vnode (either because of
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
|
||||
* $Id: vfs_subr.c,v 1.55 1996/07/12 07:41:34 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.56 1996/07/24 21:21:43 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -672,7 +672,7 @@ reassignbuf(bp, newvp)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DEVFS
|
||||
#ifndef DEVFS_ROOT
|
||||
/*
|
||||
* Create a vnode for a block device.
|
||||
* Used for root filesystem, argdev, and swap areas.
|
||||
@ -703,8 +703,8 @@ bdevvp(dev, vpp)
|
||||
*vpp = vp;
|
||||
return (0);
|
||||
}
|
||||
#endif /* !DEVFS_ROOT */
|
||||
|
||||
#endif /* !DEVFS */
|
||||
/*
|
||||
* Check to see if the new vnode represents a special device
|
||||
* for which we already have a vnode (either because of
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALix.oz.au)
|
||||
*
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.25 1996/06/12 05:08:29 gpalmer Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.26 1996/07/24 21:22:36 phk Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -783,6 +783,7 @@ DBPRINT((" vntodn "));
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef DEVFS_ROOT
|
||||
static dn_p
|
||||
findbdev(dev_t dev, dn_p dir)
|
||||
{
|
||||
@ -818,6 +819,7 @@ bdevvp(dev_t dev, struct vnode **vpp)
|
||||
return (0);
|
||||
return (devfs_dntovn(dnp, vpp));
|
||||
}
|
||||
#endif /* DEVFS_ROOT */
|
||||
|
||||
/***************************************************************\
|
||||
* given a dev_node, find the appropriate vnode if one is already*
|
||||
|
Loading…
Reference in New Issue
Block a user