From 57cef74601beac3c9114f409d7cb0152a5c34157 Mon Sep 17 00:00:00 2001 From: heas Date: Sun, 20 Feb 2005 19:43:46 +0000 Subject: [PATCH] Expose sysctl_root node to kernel sources. It will be used by FreeBSD sysctl emulation. --- sys/kern/kern_sysctl.c | 6 +++--- sys/sys/sysctl.h | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 9786089f7157..27be8fb28753 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.177 2005/02/16 00:30:28 elric Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.178 2005/02/20 19:43:46 heas Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.177 2005/02/16 00:30:28 elric Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.178 2005/02/20 19:43:46 heas Exp $"); #include "opt_defcorename.h" #include "opt_insecure.h" @@ -117,7 +117,7 @@ struct sysctllog { /* * the "root" of the new sysctl tree */ -static struct sysctlnode sysctl_root = { +struct sysctlnode sysctl_root = { .sysctl_flags = SYSCTL_VERSION| CTLFLAG_ROOT|CTLFLAG_READWRITE| CTLTYPE_NODE, diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 9c82bbf82c40..6ad68927e174 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.128 2005/02/03 19:20:02 perry Exp $ */ +/* $NetBSD: sysctl.h,v 1.129 2005/02/20 19:43:46 heas Exp $ */ /* * Copyright (c) 1989, 1993 @@ -850,6 +850,9 @@ struct buf_sysctl { #include "opt_sysctl.h" #endif +/* Root node of the kernel sysctl tree */ +extern struct sysctlnode sysctl_root; + /* * A log of nodes created by a setup function or set of setup * functions so that they can be torn down in one "transaction"