summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_export.c59
-rw-r--r--sys/kern/vfs_init.c61
-rw-r--r--sys/kern/vfs_subr.c59
3 files changed, 117 insertions, 62 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index f745e93..bb95ab3 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.74 1997/02/27 05:28:58 dyson Exp $
+ * $Id: vfs_subr.c,v 1.75 1997/02/27 16:08:43 bde Exp $
*/
/*
@@ -1644,6 +1644,63 @@ printlockedvnodes()
}
#endif
+static int
+sysctl_vfs_conf SYSCTL_HANDLER_ARGS
+{
+ int error;
+ struct vfsconf *vfsp;
+
+ if (req->newptr)
+ return EINVAL;
+ for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
+ error = SYSCTL_OUT(req, vfsp, sizeof *vfsp);
+ if (error)
+ return error;
+ }
+ return 0;
+}
+
+SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+ 0, 0, sysctl_vfs_conf, "S,vfsconf", "");
+
+#ifndef NO_COMPAT_PRELITE2
+
+#define OVFS_MAXNAMELEN 32
+struct ovfsconf {
+ void *vfc_vfsops;
+ char vfc_name[OVFS_MAXNAMELEN];
+ int vfc_index;
+ int vfc_refcount;
+ int vfc_flags;
+};
+
+static int
+sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
+{
+ int error;
+ struct vfsconf *vfsp;
+
+ if (req->newptr)
+ return EINVAL;
+ for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
+ struct ovfsconf ovfs;
+ ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */
+ strcpy(ovfs.vfc_name, vfsp->vfc_name);
+ ovfs.vfc_index = vfsp->vfc_typenum;
+ ovfs.vfc_refcount = vfsp->vfc_refcount;
+ ovfs.vfc_flags = vfsp->vfc_flags;
+ error = SYSCTL_OUT(req, &ovfs, sizeof ovfs);
+ if (error)
+ return error;
+ }
+ return 0;
+}
+
+SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+ 0, 0, sysctl_ovfs_conf, "S,ovfsconf", "");
+
+#endif /* !NO_COMPAT_PRELITE2 */
+
int kinfo_vdebug = 1;
int kinfo_vgetfailed;
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 21cdec7..21061e8 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_init.c 8.3 (Berkeley) 1/4/94
- * $Id$
+ * $Id: vfs_init.c,v 1.24 1997/02/22 09:39:32 peter Exp $
*/
@@ -53,8 +53,6 @@
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/proc.h>
-#include <vm/vm.h>
-#include <sys/sysctl.h>
static void vfs_op_init __P((void));
@@ -277,63 +275,6 @@ vfsinit(dummy)
* kernel related system variables.
*/
-static int
-sysctl_vfs_conf SYSCTL_HANDLER_ARGS
-{
- int error;
- struct vfsconf *vfsp;
-
- if (req->newptr)
- return EINVAL;
- for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
- error = SYSCTL_OUT(req, vfsp, sizeof *vfsp);
- if (error)
- return error;
- }
- return 0;
-}
-
-SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
- 0, 0, sysctl_vfs_conf, "S,vfsconf", "");
-
-#ifndef NO_COMPAT_PRELITE2
-
-#define OVFS_MAXNAMELEN 32
-struct ovfsconf {
- void *vfc_vfsops;
- char vfc_name[OVFS_MAXNAMELEN];
- int vfc_index;
- int vfc_refcount;
- int vfc_flags;
-};
-
-static int
-sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
-{
- int error;
- struct vfsconf *vfsp;
-
- if (req->newptr)
- return EINVAL;
- for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
- struct ovfsconf ovfs;
- ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */
- strcpy(ovfs.vfc_name, vfsp->vfc_name);
- ovfs.vfc_index = vfsp->vfc_typenum;
- ovfs.vfc_refcount = vfsp->vfc_refcount;
- ovfs.vfc_flags = vfsp->vfc_flags;
- error = SYSCTL_OUT(req, &ovfs, sizeof ovfs);
- if (error)
- return error;
- }
- return 0;
-}
-
-SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
- 0, 0, sysctl_ovfs_conf, "S,ovfsconf", "");
-
-#endif /* !NO_COMPAT_PRELITE2 */
-
/*
* This goop is here to support a loadable NFS module... grumble...
*/
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index f745e93..bb95ab3 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.74 1997/02/27 05:28:58 dyson Exp $
+ * $Id: vfs_subr.c,v 1.75 1997/02/27 16:08:43 bde Exp $
*/
/*
@@ -1644,6 +1644,63 @@ printlockedvnodes()
}
#endif
+static int
+sysctl_vfs_conf SYSCTL_HANDLER_ARGS
+{
+ int error;
+ struct vfsconf *vfsp;
+
+ if (req->newptr)
+ return EINVAL;
+ for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
+ error = SYSCTL_OUT(req, vfsp, sizeof *vfsp);
+ if (error)
+ return error;
+ }
+ return 0;
+}
+
+SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+ 0, 0, sysctl_vfs_conf, "S,vfsconf", "");
+
+#ifndef NO_COMPAT_PRELITE2
+
+#define OVFS_MAXNAMELEN 32
+struct ovfsconf {
+ void *vfc_vfsops;
+ char vfc_name[OVFS_MAXNAMELEN];
+ int vfc_index;
+ int vfc_refcount;
+ int vfc_flags;
+};
+
+static int
+sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
+{
+ int error;
+ struct vfsconf *vfsp;
+
+ if (req->newptr)
+ return EINVAL;
+ for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
+ struct ovfsconf ovfs;
+ ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */
+ strcpy(ovfs.vfc_name, vfsp->vfc_name);
+ ovfs.vfc_index = vfsp->vfc_typenum;
+ ovfs.vfc_refcount = vfsp->vfc_refcount;
+ ovfs.vfc_flags = vfsp->vfc_flags;
+ error = SYSCTL_OUT(req, &ovfs, sizeof ovfs);
+ if (error)
+ return error;
+ }
+ return 0;
+}
+
+SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+ 0, 0, sysctl_ovfs_conf, "S,ovfsconf", "");
+
+#endif /* !NO_COMPAT_PRELITE2 */
+
int kinfo_vdebug = 1;
int kinfo_vgetfailed;
OpenPOWER on IntegriCloud