diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-05-28 04:03:29 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-05-28 04:03:29 +0000 |
commit | 9e3c66eaaf97dfbf888b4cb60ff60341bba83e52 (patch) | |
tree | 5e65a53169d783ca2f6fc00c893f6a315f68adfb /sys/kern | |
parent | 94e0f1d81128c736c524fc83060ca6b359738272 (diff) |
Spacing in vfs_sysctl()
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b9e563fd05f..aa5b96b786b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.125 2006/05/07 14:12:15 sturm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.126 2006/05/28 04:03:28 pedro Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1358,29 +1358,38 @@ vfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, /* all sysctl names at this level are at least name and field */ if (namelen < 2) return (ENOTDIR); /* overloaded */ + if (name[0] != VFS_GENERIC) { for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (vfsp->vfc_typenum == name[0]) break; + if (vfsp == NULL) return (EOPNOTSUPP); + return ((*vfsp->vfc_vfsops->vfs_sysctl)(&name[1], namelen - 1, oldp, oldlenp, newp, newlen, p)); } + switch (name[1]) { case VFS_MAXTYPENUM: return (sysctl_rdint(oldp, oldlenp, newp, maxvfsconf)); + case VFS_CONF: if (namelen < 3) return (ENOTDIR); /* overloaded */ + for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (vfsp->vfc_typenum == name[2]) break; + if (vfsp == NULL) return (EOPNOTSUPP); + return (sysctl_rdstruct(oldp, oldlenp, newp, vfsp, sizeof(struct vfsconf))); } + return (EOPNOTSUPP); } |