Tweak sysctl setup functions (the macros, actually) for use in lkms,

and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
This commit is contained in:
atatat 2004-05-20 06:34:24 +00:00
parent 1d3a6a329e
commit 10a7ba9ef6
46 changed files with 824 additions and 90 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_vfsops.h,v 1.11 2004/04/27 17:37:30 jrf Exp $ */
/* $NetBSD: coda_vfsops.h,v 1.12 2004/05/20 06:34:24 atatat Exp $ */
/*
*
@ -63,3 +63,7 @@ void coda_done(void);
int coda_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);
int getNewVnode(struct vnode **vpp);
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_coda_setup);
#endif /* SYSCTL_SETUP_PROTO */

View File

@ -1,4 +1,4 @@
/* $NetBSD: irix_sysctl.h,v 1.1 2002/11/09 09:03:58 manu Exp $ */
/* $NetBSD: irix_sysctl.h,v 1.2 2004/05/20 06:34:24 atatat Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -84,4 +84,8 @@ extern char irix_si_version[128];
int irix_sysctl __P((int *, u_int, void *, size_t *,
void *, size_t, struct proc *));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_emul_irix_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _IRIX_SYSCTL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysctl.c,v 1.14 2004/04/27 03:49:03 atatat Exp $ */
/* $NetBSD: linux_sysctl.c,v 1.15 2004/05/20 06:34:24 atatat Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.14 2004/04/27 03:49:03 atatat Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.15 2004/05/20 06:34:24 atatat Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -68,7 +68,10 @@ char linux_release[128] = "2.0.38";
char linux_version[128] = "#0 Sun Nov 11 11:11:11 MET 2000";
#endif
static struct sysctlnode linux_sysctl_root = {
#ifndef _LKM
static
#endif
struct sysctlnode linux_sysctl_root = {
.sysctl_flags = SYSCTL_VERSION|
CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE,
.sysctl_num = 0,

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysctl.h,v 1.1 2002/02/15 20:02:57 christos Exp $ */
/* $NetBSD: linux_sysctl.h,v 1.2 2004/05/20 06:34:24 atatat Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -473,4 +473,8 @@
#define LINUX_BUS_ISA_PORT_BASE 2
#define LINUX_BUS_ISA_PORT_SHIFT 3
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(linux_sysctl_setup);
SYSCTL_SETUP_PROTO(sysctl_emul_linux_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* !_LINUX_SYSCTL_H */

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32.h,v 1.27 2004/01/21 11:28:30 mrg Exp $ */
/* $NetBSD: netbsd32.h,v 1.28 2004/05/20 06:34:25 atatat Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -559,4 +559,7 @@ int coredump_netbsd32(struct lwp *, struct vnode *, struct ucred *);
void netbsd32_from_stat43 __P((struct stat43 *, struct netbsd32_stat43 *));
int netbsd32_execve2(struct lwp *, struct sys_execve_args *, register_t *);
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(netbsd32_sysctl_emul_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _COMPAT_NETBSD32_NETBSD32_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: adosfs.h,v 1.2 2003/02/01 06:23:40 thorpej Exp $ */
/* $NetBSD: adosfs.h,v 1.3 2004/05/20 06:34:26 atatat Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -173,4 +173,8 @@ void adosfs_aremhash __P((struct anode *));
int adosfs_lookup __P((void *));
extern int (**adosfs_vnodeop_p) __P((void *));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_adosfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_extern.h,v 1.9 2004/04/27 17:37:30 jrf Exp $ */
/* $NetBSD: cd9660_extern.h,v 1.10 2004/05/20 06:34:26 atatat Exp $ */
/*-
* Copyright (c) 1994
@ -100,6 +100,10 @@ void cd9660_init __P((void));
void cd9660_reinit __P((void));
void cd9660_done __P((void));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_cd9660_setup);
#endif /* SYSCTL_SETUP_PROTO */
int cd9660_mountroot __P((void));
extern int (**cd9660_vnodeop_p) __P((void *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_extern.h,v 1.8 2004/04/27 17:37:30 jrf Exp $ */
/* $NetBSD: filecore_extern.h,v 1.9 2004/05/20 06:34:26 atatat Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@ -122,6 +122,10 @@ void filecore_init __P((void));
void filecore_reinit __P((void));
void filecore_done __P((void));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_filecore_setup);
#endif /* SYSCTL_SETUP_PROTO */
extern int (**filecore_vnodeop_p) __P((void *));
int filecore_bbchecksum __P((void *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfsmount.h,v 1.6 2004/04/19 07:53:58 jdolecek Exp $ */
/* $NetBSD: msdosfsmount.h,v 1.7 2004/05/20 06:34:26 atatat Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -230,4 +230,7 @@ void msdosfs_init __P((void));
void msdosfs_reinit __P((void));
void msdosfs_done __P((void));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_msdosfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntfs_vfsops.h,v 1.3 2003/06/29 22:31:11 fvdl Exp $ */
/* $NetBSD: ntfs_vfsops.h,v 1.4 2004/05/20 06:34:26 atatat Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko (semenu@FreeBSD.org)
@ -37,3 +37,7 @@
int ntfs_vgetex(struct mount *, ino_t, u_int32_t, char *, u_long, u_long,
struct proc *, struct vnode **);
int ntfs_calccfree(struct ntfsmount *, cn_t *);
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_ntfs_setup);
#endif /* SYSCTL_SETUP_PROTO */

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_subr.h,v 1.10 2004/04/21 01:05:38 christos Exp $ */
/* $NetBSD: smbfs_subr.h,v 1.11 2004/05/20 06:34:26 atatat Exp $ */
/*
* Copyright (c) 2000-2001, Boris Popov
@ -188,4 +188,7 @@ void smb_time_unix2dos(struct timespec *tsp, int tzoff, u_int16_t *ddp,
u_int16_t *dtp, u_int8_t *dhp);
void smb_dos2unixtime (u_int dd, u_int dt, u_int dh, int tzoff, struct timespec *tsp);
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_samba_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* !_FS_SMBFS_SMBFS_SUBR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: union.h,v 1.9 2003/10/03 16:34:31 yamt Exp $ */
/* $NetBSD: union.h,v 1.10 2004/05/20 06:34:27 atatat Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@ -170,4 +170,7 @@ void union_init __P((void));
void union_done __P((void));
int union_freevp __P((struct vnode *));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_union_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_emul.c,v 1.1 2002/11/30 13:41:40 jdolecek Exp $ */
/* $NetBSD: lkminit_emul.c,v 1.2 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 2002, 1996 The NetBSD Foundation, Inc.
@ -34,14 +34,17 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.1 2002/11/30 13:41:40 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.2 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/lkm.h>
#include <compat/irix/irix_sysctl.h>
extern const struct emul emul_irix;
int compat_irix_lkmentry __P((struct lkm_table *, int, int));
@ -51,6 +54,13 @@ int compat_irix_lkmentry __P((struct lkm_table *, int, int));
*/
MOD_COMPAT("compat_irix", -1, &emul_irix);
/*
* take care of emulation specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_emul_irix_log;
/*
* entry point
*/
@ -61,5 +71,25 @@ compat_irix_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc);
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc);
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_emul_irix_setup(&_emul_irix_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_emul_irix_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_emul.c,v 1.3 2001/11/12 23:23:03 lukem Exp $ */
/* $NetBSD: lkminit_emul.c,v 1.4 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,15 +37,18 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.3 2001/11/12 23:23:03 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.4 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/exec.h>
#include <sys/proc.h>
#include <sys/lkm.h>
#include <compat/linux/common/linux_sysctl.h>
extern const struct emul emul_linux;
int compat_linux_lkmentry __P((struct lkm_table *, int, int));
@ -55,6 +58,14 @@ int compat_linux_lkmentry __P((struct lkm_table *, int, int));
*/
MOD_COMPAT("compat_linux", -1, &emul_linux);
/*
* take care of emulation specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_compat_linux_log, *_emul_linux_log;
extern struct sysctlnode linux_sysctl_root;
/*
* entry point
*/
@ -65,5 +76,28 @@ compat_linux_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc);
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc);
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
linux_sysctl_setup(&_compat_linux_log); /* we "own" this entire tree */
sysctl_emul_linux_setup(&_emul_linux_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_emul_linux_log);
sysctl_teardown(&_compat_linux_log);
sysctl_free(&linux_sysctl_root); /* we "own" this entire tree */
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_emul.c,v 1.5 2001/11/12 23:23:03 lukem Exp $ */
/* $NetBSD: lkminit_emul.c,v 1.6 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.5 2001/11/12 23:23:03 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.6 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -60,6 +61,13 @@ int compat_netbsd32_lkmentry __P((struct lkm_table *, int, int));
*/
MOD_COMPAT("compat_netbsd32", -1, &emul_netbsd32);
/*
* take care of emulation specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_emul_netbsd32_log;
/*
* entry point
*/
@ -70,5 +78,25 @@ compat_netbsd32_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc);
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc);
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
netbsd32_sysctl_emul_setup(&_emul_netbsd32_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_emul_netbsd32_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.4 2001/11/12 23:23:28 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.5 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2001/11/12 23:23:28 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2001/11/12 23:23:28 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/adosfs/adosfs.h>
int adosfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops adosfs_vfsops;
*/
MOD_VFS("adosfs", -1, &adosfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_adosfs_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ adosfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_adosfs_setup(&_adosfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_adosfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 2002/12/23 17:45:15 jdolecek Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.2 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.1 2002/12/23 17:45:15 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.1 2002/12/23 17:45:15 jdolecek Exp
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/cd9660/iso.h>
#include <fs/cd9660/cd9660_extern.h>
int cd9660_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops cd9660_vfsops;
*/
MOD_VFS("cd9660", -1, &cd9660_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_cd9660_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ cd9660_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_cd9660_setup(&_cd9660_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_cd9660_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.7 2003/09/06 10:56:37 jdolecek Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.8 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.7 2003/09/06 10:56:37 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.8 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.7 2003/09/06 10:56:37 jdolecek Exp
#include <sys/file.h>
#include <sys/errno.h>
#include <coda/coda.h>
#include <coda/coda_vfsops.h>
int coda_lkmentry(struct lkm_table *, int, int);
static int coda_dispatch_vfs(struct lkm_table *, int, int);
@ -95,6 +99,7 @@ int
coda_lkmentry(struct lkm_table *lkmtp, int cmd, int ver)
{
int error = 0;
static struct sysctllog *_coda_log;
switch (cmd) {
case LKM_E_LOAD:
@ -102,8 +107,11 @@ coda_lkmentry(struct lkm_table *lkmtp, int cmd, int ver)
if (error)
break;
error = coda_dispatch_vfs(lkmtp, cmd, ver);
if (!error)
sysctl_vfs_coda_setup(&_coda_log);
break;
case LKM_E_UNLOAD:
sysctl_teardown(&_coda_log);
error = coda_dispatch_vfs(lkmtp, cmd, ver);
if (error)
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.2 2001/11/12 23:23:30 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.3 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2001/11/12 23:23:30 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2001/11/12 23:23:30 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/filecorefs/filecore.h>
#include <fs/filecorefs/filecore_extern.h>
int filecorefs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops filecore_vfsops;
*/
MOD_VFS("filecorefs", -1, &filecore_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_filecorefs_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ filecorefs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_filecore_setup(&_filecorefs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_filecorefs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <miscfs/fdesc/fdesc.h>
int fdesc_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops fdesc_vfsops;
*/
MOD_VFS("fdesc", -1, &fdesc_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_fdesc_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ fdesc_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_fdesc_setup(&_fdesc_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_fdesc_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:31 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <miscfs/kernfs/kernfs.h>
int kernfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops kernfs_vfsops;
*/
MOD_VFS("kernfs", -1, &kernfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_kernfs_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ kernfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_kernfs_setup(&_kernfs_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_kernfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:32 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.7 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:32 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.7 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:32 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <sys/vnode.h>
#include <miscfs/nullfs/null.h>
int nullfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops nullfs_vfsops;
*/
MOD_VFS("nullfs", -1, &nullfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_nullfs_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ nullfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_null_setup(&_nullfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_nullfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:33 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.4 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:33 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:33 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <sys/vnode.h>
#include <miscfs/overlay/overlay.h>
int overlay_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops overlay_vfsops;
*/
MOD_VFS("overlay", -1, &overlay_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_overlay_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ overlay_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_overlay_setup(&_overlay_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_overlay_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:27 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <miscfs/portal/portal.h>
int portal_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops portal_vfsops;
*/
MOD_VFS("portal", -1, &portal_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_portal_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ portal_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_portal_setup(&_portal_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_portal_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:34 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <miscfs/procfs/procfs.h>
int procfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops procfs_vfsops;
*/
MOD_VFS("procfs", -1, &procfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_procfs_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ procfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_procfs_setup(&_procfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_procfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:35 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.7 2004/05/20 06:34:28 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:35 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.7 2004/05/20 06:34:28 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2001/11/12 23:23:35 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <sys/vnode.h>
#include <miscfs/umapfs/umap.h>
int umapfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops umapfs_vfsops;
*/
MOD_VFS("umapfs", -1, &umapfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_umapfs_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ umapfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_umap_setup(&_umapfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_umapfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2003/03/16 08:01:13 jdolecek Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2003/03/16 08:01:13 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2003/03/16 08:01:13 jdolecek Exp
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/union/union.h>
int union_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops union_vfsops;
*/
MOD_VFS("union", -1, &union_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_union_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ union_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_union_setup(&_union_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_union_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:37 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:37 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:28 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:37 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/msdosfs/bpb.h>
#include <fs/msdosfs/msdosfsmount.h>
int msdosfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops msdosfs_vfsops;
*/
MOD_VFS("msdosfs", -1, &msdosfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_msdosfs_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ msdosfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_msdosfs_setup(&_msdosfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_msdosfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:38 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:29 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:38 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:29 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:38 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/ntfs/ntfs.h>
#include <fs/ntfs/ntfs_vfsops.h>
int ntfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +65,13 @@ extern struct vfsops ntfs_vfsops;
*/
MOD_VFS("ntfs", -1, &ntfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_ntfs_log;
/*
* entry point
*/
@ -71,5 +82,25 @@ ntfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
static int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_ntfs_setup(&_ntfs_log);
return (0);
}
static int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_ntfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 2003/04/02 09:45:44 jdolecek Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.2 2004/05/20 06:34:29 atatat Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.1 2003/04/02 09:45:44 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2 2004/05/20 06:34:29 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.1 2003/04/02 09:45:44 jdolecek Exp
#include <sys/file.h>
#include <sys/errno.h>
#include <fs/smbfs/smbfs_subr.h>
int smbfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops smbfs_vfsops;
*/
MOD_VFS("smbfs", -1, &smbfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_smbfs_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ smbfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_samba_setup(&_smbfs_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_smbfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:38 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.4 2004/05/20 06:34:29 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:38 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.4 2004/05/20 06:34:29 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.3 2001/11/12 23:23:38 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <ufs/ext2fs/ext2fs_extern.h>
int ext2fs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,6 +64,13 @@ extern struct vfsops ext2fs_vfsops;
*/
MOD_VFS("ext2fs", -1, &ext2fs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_ext2fs_log;
/*
* entry point
*/
@ -71,5 +81,25 @@ ext2fs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_ext2fs_setup(&_ext2fs_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_ext2fs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:39 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:29 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:39 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:29 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:39 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <ufs/ffs/ffs_extern.h>
int ffs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -56,6 +59,13 @@ int ffs_lkmentry __P((struct lkm_table *, int, int));
*/
extern struct vfsops ffs_vfsops;
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_ffs_log;
/*
* declare the filesystem
*/
@ -71,5 +81,25 @@ ffs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_ffs_setup(&_ffs_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_ffs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.8 2003/09/06 13:30:50 jdolecek Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.9 2004/05/20 06:34:30 atatat Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -34,9 +34,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.8 2003/09/06 13:30:50 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.9 2004/05/20 06:34:30 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -54,10 +55,13 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.8 2003/09/06 13:30:50 jdolecek Exp
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <ufs/lfs/lfs_extern.h>
int lfs_lkmentry __P((struct lkm_table *, int, int));
static int lfs_load __P((struct lkm_table *, int));
static int lfs_unload __P((struct lkm_table *, int));
static struct sysctllog *_lfs_log;
#define LFS_SYSENT_CNT 4
static const struct {
@ -127,6 +131,8 @@ lfs_load(lkmtp, cmd)
sysent[lfs_sysents[i].sysno] = lfs_sysents[i].sysent;
}
sysctl_vfs_lfs_setup(&_lfs_log);
return 0;
}
@ -140,6 +146,8 @@ lfs_unload(lkmtp, cmd)
{
int i;
sysctl_teardown(&_lfs_log);
/* reset lfs syscall entries back to nosys */
for(i=0; i < LFS_SYSENT_CNT; i++) {
if (sysent[lfs_sysents[i].sysno].sy_call !=

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:41 lukem Exp $ */
/* $NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:30 atatat Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:41 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.6 2004/05/20 06:34:30 atatat Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -49,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.5 2001/11/12 23:23:41 lukem Exp $"
#include <sys/file.h>
#include <sys/errno.h>
#include <ufs/mfs/mfs_extern.h>
int mfs_lkmentry __P((struct lkm_table *, int, int));
/*
@ -61,9 +64,17 @@ extern struct vfsops mfs_vfsops;
*/
MOD_VFS("mfs", -1, &mfs_vfsops);
/*
* take care of fs specific sysctl nodes
*/
static int load __P((struct lkm_table *, int));
static int unload __P((struct lkm_table *, int));
static struct sysctllog *_mfs_log;
/*
* entry point
*/
int
mfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
@ -71,5 +82,25 @@ mfs_lkmentry(lkmtp, cmd, ver)
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
DISPATCH(lkmtp, cmd, ver, load, unload, lkm_nofunc)
}
int
load(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_vfs_mfs_setup(&_mfs_log);
return (0);
}
int
unload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
sysctl_teardown(&_mfs_log);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fdesc.h,v 1.15 2003/08/07 16:32:32 agc Exp $ */
/* $NetBSD: fdesc.h,v 1.16 2004/05/20 06:34:30 atatat Exp $ */
/*
* Copyright (c) 1992, 1993
@ -77,4 +77,8 @@ extern int fdesc_root __P((struct mount *, struct vnode **));
extern int fdesc_allocvp __P((fdntype, int, struct mount *, struct vnode **));
extern int (**fdesc_vnodeop_p) __P((void *));
extern struct vfsops fdesc_vfsops;
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_fdesc_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: kernfs.h,v 1.22 2004/05/07 15:33:17 cl Exp $ */
/* $NetBSD: kernfs.h,v 1.23 2004/05/20 06:34:30 atatat Exp $ */
/*
* Copyright (c) 1992, 1993
@ -192,4 +192,8 @@ kfstype kernfs_alloctype(int, const struct kernfs_fileop *);
#define KERNFS_ENTOPARENTDIR(dkt) &(dkt)->dkt_kt
int kernfs_addentry __P((kernfs_parentdir_t *, kernfs_entry_t *));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_kernfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: null.h,v 1.14 2003/08/07 16:32:38 agc Exp $ */
/* $NetBSD: null.h,v 1.15 2004/05/20 06:34:30 atatat Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -122,4 +122,7 @@ extern struct vfsops nullfs_vfsops;
void nullfs_init __P((void));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_null_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: overlay.h,v 1.4 2003/08/07 16:32:39 agc Exp $ */
/* $NetBSD: overlay.h,v 1.5 2004/05/20 06:34:30 atatat Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -123,4 +123,8 @@ extern struct vnode *layer_checkvp __P((struct vnode *vp, char *fil, int lno));
extern int (**overlay_vnodeop_p) __P((void *));
extern struct vfsops overlay_vfsops;
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_overlay_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: portal.h,v 1.8 2003/08/07 16:32:40 agc Exp $ */
/* $NetBSD: portal.h,v 1.9 2004/05/20 06:34:30 atatat Exp $ */
/*
* Copyright (c) 1992, 1993
@ -67,4 +67,8 @@ struct portalnode {
extern int (**portal_vnodeop_p) __P((void *));
extern struct vfsops portal_vfsops;
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_portal_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: procfs.h,v 1.52 2003/12/10 14:19:02 drochner Exp $ */
/* $NetBSD: procfs.h,v 1.53 2004/05/20 06:34:32 atatat Exp $ */
/*
* Copyright (c) 1993
@ -235,4 +235,7 @@ int procfs_machdep_rw(struct proc *, struct lwp *, struct pfsnode *,
int procfs_machdep_getattr(struct vnode *, struct vattr *, struct proc *);
#endif
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_procfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: umap.h,v 1.10 2003/08/07 16:32:44 agc Exp $ */
/* $NetBSD: umap.h,v 1.11 2004/05/20 06:34:32 atatat Exp $ */
/*
* Copyright (c) 1992, 1993
@ -108,4 +108,7 @@ int umap_bypass __P((void *));
#define NUMAPNODECACHE 16
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_umap_setup);
#endif /* SYSCTL_SETUP_PROTO */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.124 2004/04/25 05:47:53 atatat Exp $ */
/* $NetBSD: sysctl.h,v 1.125 2004/05/20 06:34:32 atatat Exp $ */
/*
* Copyright (c) 1989, 1993
@ -901,6 +901,27 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19;
oldlenp, newp, newlen, \
oname, l, (struct sysctlnode *)node
#ifdef _LKM
#define SYSCTL_SETUP_PROTO(name) \
void name(struct sysctllog **)
#ifdef SYSCTL_DEBUG_SETUP
#define SYSCTL_SETUP(name, desc) \
static void __CONCAT(___,name)(struct sysctllog **); \
void name(struct sysctllog **clog) { \
printf("%s\n", desc); \
__CONCAT(___,name)(clog); } \
__link_set_add_text(sysctl_funcs, name); \
static void __CONCAT(___,name)(struct sysctllog **clog)
#else /* SYSCTL_DEBUG_SETUP */
#define SYSCTL_SETUP(name, desc) \
__link_set_add_text(sysctl_funcs, name); \
void name(struct sysctllog **clog)
#endif /* SYSCTL_DEBUG_SETUP */
#else /* _LKM */
#define SYSCTL_SETUP_PROTO(name)
#ifdef SYSCTL_DEBUG_SETUP
#define SYSCTL_SETUP(name, desc) \
static void __CONCAT(___,name)(struct sysctllog **); \
@ -917,6 +938,8 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19;
#endif /* SYSCTL_DEBUG_SETUP */
typedef void (*sysctl_setup_func)(struct sysctllog **);
#endif /* _LKM */
/*
* Internal sysctl function calling convention:
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_extern.h,v 1.23 2004/04/21 01:05:44 christos Exp $ */
/* $NetBSD: ext2fs_extern.h,v 1.24 2004/05/20 06:34:32 atatat Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -176,6 +176,10 @@ int ext2fs_makeinode __P((int, struct vnode *, struct vnode **,
int ext2fs_reclaim __P((void *));
#define ext2fs_fsync genfs_fsync
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_ext2fs_setup);
#endif /* SYSCTL_SETUP_PROTO */
__END_DECLS
#define IS_EXT2_VNODE(vp) (vp->v_tag == VT_EXT2FS)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_extern.h,v 1.37 2004/04/21 01:05:44 christos Exp $ */
/* $NetBSD: ffs_extern.h,v 1.38 2004/05/20 06:34:33 atatat Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -151,6 +151,11 @@ int ffs_reclaim __P((void *));
int ffs_getpages __P((void *));
int ffs_putpages __P((void *));
void ffs_gop_size __P((struct vnode *, off_t, off_t *, int));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_ffs_setup);
#endif /* SYSCTL_SETUP_PROTO */
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_extern.h,v 1.60 2004/04/21 01:05:44 christos Exp $ */
/* $NetBSD: lfs_extern.h,v 1.61 2004/05/20 06:34:33 atatat Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@ -257,6 +257,10 @@ int lfs_write (void *);
int lfs_getpages (void *);
int lfs_putpages (void *);
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_lfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
__END_DECLS
extern int lfs_mount_type;
extern int (**lfs_vnodeop_p)(void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfs_extern.h,v 1.19 2004/04/21 01:05:46 christos Exp $ */
/* $NetBSD: mfs_extern.h,v 1.20 2004/05/20 06:34:33 atatat Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -70,6 +70,10 @@ int mfs_inactive __P((void *));
int mfs_reclaim __P((void *));
int mfs_print __P((void *));
#ifdef SYSCTL_SETUP_PROTO
SYSCTL_SETUP_PROTO(sysctl_vfs_mfs_setup);
#endif /* SYSCTL_SETUP_PROTO */
__END_DECLS
#endif /* !_UFS_MFS_MFS_EXTERN_H_ */