summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_sysctl.c
diff options
context:
space:
mode:
authoratatat <atatat@NetBSD.org>2004-05-20 06:34:24 +0000
committeratatat <atatat@NetBSD.org>2004-05-20 06:34:24 +0000
commit10a7ba9ef6bedd7f00fdb55bdc125b97dce35258 (patch)
tree0586196aca8565a8e8593c849aff4dc0d8797b16 /sys/compat/linux/common/linux_sysctl.c
parent1d3a6a329e70f804a4ee718c6a0f412c02a37fae (diff)
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).
Diffstat (limited to 'sys/compat/linux/common/linux_sysctl.c')
-rw-r--r--sys/compat/linux/common/linux_sysctl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/compat/linux/common/linux_sysctl.c b/sys/compat/linux/common/linux_sysctl.c
index 67b9d518fa2..4df871301fd 100644
--- a/sys/compat/linux/common/linux_sysctl.c
+++ b/sys/compat/linux/common/linux_sysctl.c
@@ -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,