1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Moved vfs sysctls to where Lite2 put them. No code changes yet.

This commit is contained in:
Bruce Evans 1997-03-02 11:06:22 +00:00
parent 8830f80880
commit a896f0256c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23254
3 changed files with 117 additions and 62 deletions

View File

@ -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;

View File

@ -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...
*/

View File

@ -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;