summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-03-04 18:31:56 +0000
committerbde <bde@FreeBSD.org>1997-03-04 18:31:56 +0000
commit61a92b4f52edf5aaf3f135a45cd31c73e9f22916 (patch)
treefb6fa5996e05b55e4d2b9be5d264419032635917 /sys/kern/vfs_subr.c
parent4d01bbdf71fde1b95bfc8dd3a1c4330fac3fae89 (diff)
downloadFreeBSD-src-61a92b4f52edf5aaf3f135a45cd31c73e9f22916.zip
FreeBSD-src-61a92b4f52edf5aaf3f135a45cd31c73e9f22916.tar.gz
Attach vfs_sysctl() one level lower so that only the levels below
VFS_GENERIC aren't done in the FreeBSD way. The previous commit broke the nfs sysctls.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 0f65e66..b9ef8f3 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.77 1997/03/02 17:53:37 bde Exp $
+ * $Id: vfs_subr.c,v 1.78 1997/03/03 12:58:20 bde Exp $
*/
/*
@@ -1647,22 +1647,22 @@ printlockedvnodes()
/*
* Top level filesystem related information gathering.
*/
-extern int vfs_sysctl __P(SYSCTL_HANDLER_ARGS);
static int sysctl_ovfs_conf __P(SYSCTL_HANDLER_ARGS);
-int
+static int
vfs_sysctl SYSCTL_HANDLER_ARGS
{
- int *name = (int *)arg1;
- u_int namelen = arg2;
+ int *name = (int *)arg1 - 1; /* XXX */
+ u_int namelen = arg2 + 1; /* XXX */
struct vfsconf *vfsp;
#ifndef NO_COMPAT_PRELITE2
/* Resolve ambiguity between VFS_VFSCONF and VFS_GENERIC. */
- if (namelen == 1 && name[0] == VFS_VFSCONF)
+ if (namelen == 1)
return (sysctl_ovfs_conf(oidp, arg1, arg2, req));
#endif
+#ifdef notyet
/* all sysctl names at this level are at least name and field */
if (namelen < 2)
return (ENOTDIR); /* overloaded */
@@ -1672,13 +1672,10 @@ vfs_sysctl SYSCTL_HANDLER_ARGS
break;
if (vfsp == NULL)
return (EOPNOTSUPP);
-#ifdef notyet
return ((*vfsp->vfc_vfsops->vfs_sysctl)(&name[1], namelen - 1,
oldp, oldlenp, newp, newlen, p));
-#else
- return (EOPNOTSUPP);
-#endif
}
+#endif
switch (name[1]) {
case VFS_MAXTYPENUM:
if (namelen != 2)
@@ -1697,6 +1694,9 @@ vfs_sysctl SYSCTL_HANDLER_ARGS
return (EOPNOTSUPP);
}
+SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD, vfs_sysctl,
+ "Generic filesystem");
+
#ifndef NO_COMPAT_PRELITE2
static int
OpenPOWER on IntegriCloud