Module Name: src Committed By: apb Date: Fri Sep 11 18:14:58 UTC 2009
Modified Files: src/doc: CHANGES src/share/man/man7: sysctl.7 src/share/man/man9: boothowto.9 src/sys/kern: init_sysctl.c Log Message: Expose the kernel's boothowto(9) variable through the sysctl kern.boothowto variable. Part of the /etc/rc silent changes requested in PR 41946 and proposed in tech-userlevel. To generate a diff of this commit: cvs rdiff -u -r1.1286 -r1.1287 src/doc/CHANGES cvs rdiff -u -r1.22 -r1.23 src/share/man/man7/sysctl.7 cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/boothowto.9 cvs rdiff -u -r1.165 -r1.166 src/sys/kern/init_sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1286 src/doc/CHANGES:1.1287 --- src/doc/CHANGES:1.1286 Mon Sep 7 04:23:29 2009 +++ src/doc/CHANGES Fri Sep 11 18:14:58 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1286 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1287 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -388,3 +388,4 @@ sysinst(8): Install the new modules.tgz set. [jnemeth 20090907] build.sh: Add a modules operation which builds kernel modules and installs them into DESTDIR. [jnemeth 20090907] + sysctl(7): Add kern.boothowto variable. [apb 20090911] Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.22 src/share/man/man7/sysctl.7:1.23 --- src/share/man/man7/sysctl.7:1.22 Mon May 18 00:41:53 2009 +++ src/share/man/man7/sysctl.7 Fri Sep 11 18:14:58 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.22 2009/05/18 00:41:53 snj Exp $ +.\" $NetBSD: sysctl.7,v 1.23 2009/09/11 18:14:58 apb Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -341,6 +341,10 @@ all non-root processes are immediately lowered. .It Li kern.autoniceval ( KERN_AUTONICEVAL ) The priority assigned for automatically niced processes. +.It Li kern.boothowto +Flags passed from the boot loader; see +.Xr reboot 2 +for the meanings of the flags. .It Li kern.boottime ( KERN_BOOTTIME ) A .Va struct timeval Index: src/share/man/man9/boothowto.9 diff -u src/share/man/man9/boothowto.9:1.2 src/share/man/man9/boothowto.9:1.3 --- src/share/man/man9/boothowto.9:1.2 Sat Sep 5 11:32:36 2009 +++ src/share/man/man9/boothowto.9 Fri Sep 11 18:14:58 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: boothowto.9,v 1.2 2009/09/05 11:32:36 wiz Exp $ +.\" $NetBSD: boothowto.9,v 1.3 2009/09/11 18:14:58 apb Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -51,6 +51,10 @@ .Dq Sy AB_ Ns No * symbols in .In sys/reboot.h . +The value is made available via the +.Xr sysctl 7 +variable +.Va kern.boothowto . .Pp The .Dv BOOT_FLAG @@ -254,6 +258,8 @@ .Xr ddb 4 , .\" RB_USERCONF .Xr userconf 4 , +.\" sysctl kern.boothowto +.Xr sysctl 7 .\" sets boothowto .Xr boot 8 , .\" .Xr crash 8 , Index: src/sys/kern/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.165 src/sys/kern/init_sysctl.c:1.166 --- src/sys/kern/init_sysctl.c:1.165 Sun Aug 16 20:28:19 2009 +++ src/sys/kern/init_sysctl.c Fri Sep 11 18:14:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.165 2009/08/16 20:28:19 christos Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.165 2009/08/16 20:28:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $"); #include "opt_sysv.h" #include "opt_compat_netbsd32.h" @@ -446,6 +446,12 @@ #endif /* _POSIX_SAVED_IDS */ NULL, 0, CTL_KERN, KERN_SAVED_IDS, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT|CTLFLAG_HEX, + CTLTYPE_INT, "boothowto", + SYSCTL_DESCR("Flags from boot loader"), + NULL, 0, &boothowto, sizeof(boothowto), + CTL_KERN, CTL_CREATE, CTL_EOL); + sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRUCT, "boottime", SYSCTL_DESCR("System boot time"),