Actually implement the functionality documented in sysctl.h for type CTL_FS.

(Namely, call a filesystem-dependent sysctl function analogous to how it works
for networking and (now) physical devices.)
This commit is contained in:
Garrett Wollman 1994-10-20 00:48:28 +00:00
parent 74fbff447d
commit 03a6294027
2 changed files with 16 additions and 2 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_init.c 8.3 (Berkeley) 1/4/94
* $Id: vfs_init.c,v 1.7 1994/09/22 22:10:36 wollman Exp $
* $Id: vfs_init.c,v 1.8 1994/10/08 22:33:42 phk Exp $
*/
@ -321,6 +321,18 @@ fs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return 0;
default:
if(namelen < 1) return EINVAL;
i = name[0];
if(i <= MOUNT_MAXTYPE
&& vfssw[i]
&& vfssw[i]->vfs_sysctl) {
return vfssw[i]->vfs_sysctl(name + 1, namelen - 1,
oldp, oldlenp,
newp, newlen, p);
}
return (EOPNOTSUPP);
}
/* NOTREACHED */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.13 (Berkeley) 3/27/94
* $Id: mount.h,v 1.10 1994/09/22 01:05:03 wollman Exp $
* $Id: mount.h,v 1.11 1994/09/27 20:39:50 phk Exp $
*/
#ifndef _SYS_MOUNT_H_
@ -236,6 +236,8 @@ struct vfsops {
int *exflagsp, struct ucred **credanonp));
int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp));
int (*vfs_init) __P((void));
int (*vfs_sysctl) __P((int *, u_int, void *, size_t *, void *, size_t,
struct proc *));
};
#define VFS_MOUNT(MP, PATH, DATA, NDP, P) \