summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-07-30 18:00:32 +0000
committerbde <bde@FreeBSD.org>1996-07-30 18:00:32 +0000
commit63ae415aca7fea68d536c633cda385017d8b3afd (patch)
tree83db2fcf933ed06ded79ad64dd163b4b43152fb4
parent07baf622f9f70f70167d85e46f864c093a209c82 (diff)
downloadFreeBSD-src-63ae415aca7fea68d536c633cda385017d8b3afd.zip
FreeBSD-src-63ae415aca7fea68d536c633cda385017d8b3afd.tar.gz
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).
-rw-r--r--sys/kern/vfs_export.c6
-rw-r--r--sys/kern/vfs_subr.c6
-rw-r--r--sys/miscfs/devfs/devfs_tree.c4
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 53747dc..3070b3e 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -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
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 53747dc..3070b3e 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -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
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c
index 0db8960..6342cef 100644
--- a/sys/miscfs/devfs/devfs_tree.c
+++ b/sys/miscfs/devfs/devfs_tree.c
@@ -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*
OpenPOWER on IntegriCloud