Move some sysctl node creations away from linksets and into the

constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.
This commit is contained in:
pooka 2008-12-07 20:58:46 +00:00
parent 59f928fb25
commit 54b9426187
8 changed files with 131 additions and 89 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.377 2008/12/04 23:18:13 he Exp $ */
/* $NetBSD: init_main.c,v 1.378 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.377 2008/12/04 23:18:13 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.378 2008/12/07 20:58:46 pooka Exp $");
#include "opt_ddb.h"
#include "opt_ipsec.h"
@ -351,6 +351,9 @@ main(void)
/* Do machine-dependent initialization. */
cpu_startup();
/* Initialize the sysctl subsystem. */
sysctl_init();
/* Initialize callouts, part 1. */
callout_startup();
@ -423,9 +426,6 @@ main(void)
*/
mbinit();
/* Initialize the sysctl subsystem. */
sysctl_init();
/* Initialize I/O statistics. */
iostat_init();

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_domain.c,v 1.76 2008/04/24 11:38:36 ad Exp $ */
/* $NetBSD: uipc_domain.c,v 1.77 2008/12/07 20:58:46 pooka Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.76 2008/04/24 11:38:36 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.77 2008/12/07 20:58:46 pooka Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@ -73,6 +73,9 @@ callout_t pffasttimo_ch, pfslowtimo_ch;
u_int pfslowtimo_now;
u_int pffasttimo_now;
static struct sysctllog *domain_sysctllog;
static void sysctl_net_setup(void);
void
domaininit(void)
{
@ -80,6 +83,8 @@ domaininit(void)
struct domain * const * dpp;
struct domain *rt_domain = NULL;
sysctl_net_setup();
/*
* Add all of the domains. Make sure the PF_ROUTE
* domain is added last.
@ -471,39 +476,42 @@ sysctl_unpcblist(SYSCTLFN_ARGS)
return (error);
}
SYSCTL_SETUP(sysctl_net_setup, "sysctl net subtree setup")
static void
sysctl_net_setup()
{
sysctl_createv(clog, 0, NULL, NULL,
KASSERT(domain_sysctllog == NULL);
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "net", NULL,
NULL, 0, NULL, 0,
CTL_NET, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "local",
SYSCTL_DESCR("PF_LOCAL related settings"),
NULL, 0, NULL, 0,
CTL_NET, PF_LOCAL, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "stream",
SYSCTL_DESCR("SOCK_STREAM settings"),
NULL, 0, NULL, 0,
CTL_NET, PF_LOCAL, SOCK_STREAM, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "dgram",
SYSCTL_DESCR("SOCK_DGRAM settings"),
NULL, 0, NULL, 0,
CTL_NET, PF_LOCAL, SOCK_DGRAM, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRUCT, "pcblist",
SYSCTL_DESCR("SOCK_STREAM protocol control block list"),
sysctl_unpcblist, 0, NULL, 0,
CTL_NET, PF_LOCAL, SOCK_STREAM, CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&domain_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRUCT, "pcblist",
SYSCTL_DESCR("SOCK_DGRAM protocol control block list"),

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_mbuf.c,v 1.128 2008/07/02 14:47:34 matt Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.129 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.128 2008/07/02 14:47:34 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.129 2008/12/07 20:58:46 pooka Exp $");
#include "opt_mbuftrace.h"
#include "opt_ddb.h"
@ -102,6 +102,10 @@ static int mb_ctor(void *, void *, int);
static void *mclpool_alloc(struct pool *, int);
static void mclpool_release(struct pool *, void *);
static void sysctl_kern_mbuf_setup(void);
static struct sysctllog *mbuf_sysctllog;
static struct pool_allocator mclpool_allocator = {
.pa_alloc = mclpool_alloc,
.pa_free = mclpool_release,
@ -163,6 +167,8 @@ mbinit(void)
CTASSERT(sizeof(struct _m_ext) <= MHLEN);
CTASSERT(sizeof(struct mbuf) == MSIZE);
sysctl_kern_mbuf_setup();
mclpool_allocator.pa_backingmap = mb_map;
mb_cache = pool_cache_init(msize, 0, 0, 0, "mbpl",
@ -359,59 +365,61 @@ sysctl_kern_mbuf_stats(SYSCTLFN_ARGS)
return sysctl_lookup(SYSCTLFN_CALL(&node));
}
SYSCTL_SETUP(sysctl_kern_mbuf_setup, "sysctl kern.mbuf subtree setup")
static void
sysctl_kern_mbuf_setup()
{
sysctl_createv(clog, 0, NULL, NULL,
KASSERT(mbuf_sysctllog == NULL);
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "kern", NULL,
NULL, 0, NULL, 0,
CTL_KERN, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "mbuf",
SYSCTL_DESCR("mbuf control variables"),
NULL, 0, NULL, 0,
CTL_KERN, KERN_MBUF, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
CTLTYPE_INT, "msize",
SYSCTL_DESCR("mbuf base size"),
NULL, msize, NULL, 0,
CTL_KERN, KERN_MBUF, MBUF_MSIZE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
CTLTYPE_INT, "mclbytes",
SYSCTL_DESCR("mbuf cluster size"),
NULL, mclbytes, NULL, 0,
CTL_KERN, KERN_MBUF, MBUF_MCLBYTES, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "nmbclusters",
SYSCTL_DESCR("Limit on the number of mbuf clusters"),
sysctl_kern_mbuf, 0, &nmbclusters, 0,
CTL_KERN, KERN_MBUF, MBUF_NMBCLUSTERS, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "mblowat",
SYSCTL_DESCR("mbuf low water mark"),
sysctl_kern_mbuf, 0, &mblowat, 0,
CTL_KERN, KERN_MBUF, MBUF_MBLOWAT, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "mcllowat",
SYSCTL_DESCR("mbuf cluster low water mark"),
sysctl_kern_mbuf, 0, &mcllowat, 0,
CTL_KERN, KERN_MBUF, MBUF_MCLLOWAT, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRUCT, "stats",
SYSCTL_DESCR("mbuf allocation statistics"),
sysctl_kern_mbuf_stats, 0, NULL, 0,
CTL_KERN, KERN_MBUF, MBUF_STATS, CTL_EOL);
#ifdef MBUFTRACE
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&mbuf_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRUCT, "mowners",
SYSCTL_DESCR("Information about mbuf owners"),

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_socket.c,v 1.177 2008/10/14 13:45:26 ad Exp $ */
/* $NetBSD: uipc_socket.c,v 1.178 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008 The NetBSD Foundation, Inc.
@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.177 2008/10/14 13:45:26 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.178 2008/12/07 20:58:46 pooka Exp $");
#include "opt_sock_counters.h"
#include "opt_sosend_loan.h"
@ -150,6 +150,9 @@ static kcondvar_t socurkva_cv;
static size_t sodopendfree(void);
static size_t sodopendfreel(void);
static void sysctl_kern_somaxkva_setup(void);
static struct sysctllog *socket_sysctllog;
static vsize_t
sokvareserve(struct socket *so, vsize_t len)
{
@ -423,6 +426,8 @@ void
soinit(void)
{
sysctl_kern_somaxkva_setup();
mutex_init(&so_pendfree_lock, MUTEX_DEFAULT, IPL_VM);
softnet_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
cv_init(&socurkva_cv, "sokva");
@ -2260,16 +2265,18 @@ sysctl_kern_somaxkva(SYSCTLFN_ARGS)
return (error);
}
SYSCTL_SETUP(sysctl_kern_somaxkva_setup, "sysctl kern.somaxkva setup")
static void
sysctl_kern_somaxkva_setup()
{
sysctl_createv(clog, 0, NULL, NULL,
KASSERT(socket_sysctllog == NULL);
sysctl_createv(&socket_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "kern", NULL,
NULL, 0, NULL, 0,
CTL_KERN, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&socket_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "somaxkva",
SYSCTL_DESCR("Maximum amount of kernel memory to be "

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_bio.c,v 1.214 2008/11/16 19:34:19 joerg Exp $ */
/* $NetBSD: vfs_bio.c,v 1.215 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@ -109,7 +109,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.214 2008/11/16 19:34:19 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.215 2008/12/07 20:58:46 pooka Exp $");
#include "fs_ffs.h"
#include "opt_bufcache.h"
@ -176,6 +176,8 @@ static void biointr(void *);
static void biodone2(buf_t *);
static void bref(buf_t *);
static void brele(buf_t *);
static void sysctl_kern_buf_setup(void);
static void sysctl_vm_buf_setup(void);
/*
* Definitions for the buffer hash lists.
@ -505,6 +507,9 @@ bufinit(void)
*/
nbuf = (bufmem_hiwater / 1024) / 3;
bufhashtbl = hashinit(nbuf, HASH_LIST, true, &bufhash);
sysctl_kern_buf_setup();
sysctl_vm_buf_setup();
}
void
@ -1850,15 +1855,18 @@ sysctl_bufvm_update(SYSCTLFN_ARGS)
return 0;
}
SYSCTL_SETUP(sysctl_kern_buf_setup, "sysctl kern.buf subtree setup")
static struct sysctllog *vfsbio_sysctllog;
static void
sysctl_kern_buf_setup(void)
{
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "kern", NULL,
NULL, 0, NULL, 0,
CTL_KERN, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "buf",
SYSCTL_DESCR("Kernel buffer cache information"),
@ -1866,37 +1874,37 @@ SYSCTL_SETUP(sysctl_kern_buf_setup, "sysctl kern.buf subtree setup")
CTL_KERN, KERN_BUF, CTL_EOL);
}
SYSCTL_SETUP(sysctl_vm_buf_setup, "sysctl vm.buf* subtree setup")
static void
sysctl_vm_buf_setup(void)
{
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "vm", NULL,
NULL, 0, NULL, 0,
CTL_VM, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "bufcache",
SYSCTL_DESCR("Percentage of physical memory to use for "
"buffer cache"),
sysctl_bufvm_update, 0, &bufcache, 0,
CTL_VM, CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READONLY,
CTLTYPE_INT, "bufmem",
SYSCTL_DESCR("Amount of kernel memory used by buffer "
"cache"),
NULL, 0, &bufmem, 0,
CTL_VM, CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "bufmem_lowater",
SYSCTL_DESCR("Minimum amount of kernel memory to "
"reserve for buffer cache"),
sysctl_bufvm_update, 0, &bufmem_lowater, 0,
CTL_VM, CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
sysctl_createv(&vfsbio_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "bufmem_hiwater",
SYSCTL_DESCR("Maximum amount of kernel memory to use "

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_init.c,v 1.41 2008/09/27 13:01:07 reinoud Exp $ */
/* $NetBSD: vfs_init.c,v 1.42 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.41 2008/09/27 13:01:07 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.42 2008/12/07 20:58:46 pooka Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@ -82,6 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.41 2008/09/27 13:01:07 reinoud Exp $"
#include <sys/systm.h>
#include <sys/module.h>
#include <sys/dirhash.h>
#include <sys/sysctl.h>
/*
* Sigh, such primitive tools are these...
@ -138,6 +139,50 @@ vn_default_error(void *v)
return (EOPNOTSUPP);
}
static struct sysctllog *vfs_sysctllog;
/*
* Top level filesystem related information gathering.
*/
static void
sysctl_vfs_setup(void)
{
extern int dovfsusermount;
extern int vfs_magiclinks;
sysctl_createv(&vfs_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "vfs", NULL,
NULL, 0, NULL, 0,
CTL_VFS, CTL_EOL);
sysctl_createv(&vfs_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "generic",
SYSCTL_DESCR("Non-specific vfs related information"),
NULL, 0, NULL, 0,
CTL_VFS, VFS_GENERIC, CTL_EOL);
sysctl_createv(&vfs_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "usermount",
SYSCTL_DESCR("Whether unprivileged users may mount "
"filesystems"),
NULL, 0, &dovfsusermount, 0,
CTL_VFS, VFS_GENERIC, VFS_USERMOUNT, CTL_EOL);
sysctl_createv(&vfs_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRING, "fstypes",
SYSCTL_DESCR("List of file systems present"),
sysctl_vfs_generic_fstypes, 0, NULL, 0,
CTL_VFS, VFS_GENERIC, CTL_CREATE, CTL_EOL);
sysctl_createv(&vfs_sysctllog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "magiclinks",
SYSCTL_DESCR("Whether \"magic\" symlinks are expanded"),
NULL, 0, &vfs_magiclinks, 0,
CTL_VFS, VFS_GENERIC, VFS_MAGICLINKS, CTL_EOL);
}
/*
* vfs_init.c
*
@ -302,6 +347,11 @@ void
vfsinit(void)
{
/*
* Attach sysctl nodes
*/
sysctl_vfs_setup();
/*
* Initialize the namei pathname buffer pool and cache.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr.c,v 1.357 2008/09/24 09:33:40 ad Exp $ */
/* $NetBSD: vfs_subr.c,v 1.358 2008/12/07 20:58:46 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.357 2008/09/24 09:33:40 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.358 2008/12/07 20:58:46 pooka Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -138,9 +138,6 @@ const int vttoif_tab[9] = {
int doforce = 1; /* 1 => permit forcible unmounting */
int prtactive = 0; /* 1 => print out reclaim of active vnodes */
extern int dovfsusermount; /* 1 => permit any user to mount filesystems */
extern int vfs_magiclinks; /* 1 => expand "magic" symlinks */
static vnodelst_t vnode_free_list = TAILQ_HEAD_INITIALIZER(vnode_free_list);
static vnodelst_t vnode_hold_list = TAILQ_HEAD_INITIALIZER(vnode_hold_list);
static vnodelst_t vrele_list = TAILQ_HEAD_INITIALIZER(vrele_list);
@ -2025,7 +2022,7 @@ vrevoke(vnode_t *vp)
/*
* sysctl helper routine to return list of supported fstypes
*/
static int
int
sysctl_vfs_generic_fstypes(SYSCTLFN_ARGS)
{
char bf[sizeof(((struct statvfs *)NULL)->f_fstypename)];
@ -2081,43 +2078,6 @@ sysctl_vfs_generic_fstypes(SYSCTLFN_ARGS)
return (error);
}
/*
* Top level filesystem related information gathering.
*/
SYSCTL_SETUP(sysctl_vfs_setup, "sysctl vfs subtree setup")
{
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "vfs", NULL,
NULL, 0, NULL, 0,
CTL_VFS, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "generic",
SYSCTL_DESCR("Non-specific vfs related information"),
NULL, 0, NULL, 0,
CTL_VFS, VFS_GENERIC, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "usermount",
SYSCTL_DESCR("Whether unprivileged users may mount "
"filesystems"),
NULL, 0, &dovfsusermount, 0,
CTL_VFS, VFS_GENERIC, VFS_USERMOUNT, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRING, "fstypes",
SYSCTL_DESCR("List of file systems present"),
sysctl_vfs_generic_fstypes, 0, NULL, 0,
CTL_VFS, VFS_GENERIC, CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "magiclinks",
SYSCTL_DESCR("Whether \"magic\" symlinks are expanded"),
NULL, 0, &vfs_magiclinks, 0,
CTL_VFS, VFS_GENERIC, VFS_MAGICLINKS, CTL_EOL);
}
int kinfo_vdebug = 1;
int kinfo_vgetfailed;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.178 2008/11/12 12:36:28 ad Exp $ */
/* $NetBSD: sysctl.h,v 1.179 2008/12/07 20:58:46 pooka Exp $ */
/*
* Copyright (c) 1989, 1993
@ -1178,6 +1178,7 @@ int sysctl_kern_vnode(SYSCTLFN_PROTO);
int sysctl_net_inet_ip_ports(SYSCTLFN_PROTO);
int sysctl_consdev(SYSCTLFN_PROTO);
int sysctl_root_device(SYSCTLFN_PROTO);
int sysctl_vfs_generic_fstypes(SYSCTLFN_PROTO);
/*
* primitive helper stubs