Module Name: src Committed By: pgoyette Date: Wed Sep 7 01:18:33 UTC 2022
Modified Files: src/share/man/man9: sysctl.9 Log Message: Update to match recent changes in implementation. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man9/sysctl.9 diff -u src/share/man/man9/sysctl.9:1.23 src/share/man/man9/sysctl.9:1.24 --- src/share/man/man9/sysctl.9:1.23 Wed Aug 7 19:58:50 2019 +++ src/share/man/man9/sysctl.9 Wed Sep 7 01:18:32 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.23 2019/08/07 19:58:50 wiz Exp $ +.\" $NetBSD: sysctl.9,v 1.24 2022/09/07 01:18:32 pgoyette Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 7, 2019 +.Dd September 6, 2022 .Dt SYSCTL 9 .Os .Sh NAME @@ -546,7 +546,8 @@ specifically ignores any arguments given to zero, and returns success. .Sh SETUP FUNCTIONS Although nodes can be added to the SYSCTL tree at any time, in order to -add nodes during the kernel bootstrap phase, a proper +add nodes during the kernel bootstrap phase (and during loadable module +initialization), a proper .Dq setup function must be used. Setup functions are declared using the @@ -565,11 +566,11 @@ The address of the function is added to traverses during initialization. For loadable kernel modules (see .Xr module 9 ) , -the list of functions is called from the module loader after the module's +the list of functions is called from the module loader before the module's initialization routine. Any sysctl nodes created for the loadable module are removed using .Fn sysctl_teardown -before calling the module's termination code. +after calling the module's termination code. .Pp Setup functions do not have to add nodes to the main tree, but can set up their own trees for emulation or other purposes.