Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Expose the kernel's boothowto(9) variable through the sysctl
details: https://anonhg.NetBSD.org/src/rev/a27194d60069
branches: trunk
changeset: 747330:a27194d60069
user: apb <apb%NetBSD.org@localhost>
date: Fri Sep 11 18:14:58 2009 +0000
description:
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.
diffstat:
doc/CHANGES | 3 ++-
share/man/man7/sysctl.7 | 6 +++++-
share/man/man9/boothowto.9 | 8 +++++++-
sys/kern/init_sysctl.c | 10 ++++++++--
4 files changed, 22 insertions(+), 5 deletions(-)
diffs (94 lines):
diff -r 6fa1491e871a -r a27194d60069 doc/CHANGES
--- a/doc/CHANGES Fri Sep 11 16:01:58 2009 +0000
+++ b/doc/CHANGES Fri Sep 11 18:14:58 2009 +0000
@@ -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]
diff -r 6fa1491e871a -r a27194d60069 share/man/man7/sysctl.7
--- a/share/man/man7/sysctl.7 Fri Sep 11 16:01:58 2009 +0000
+++ b/share/man/man7/sysctl.7 Fri Sep 11 18:14:58 2009 +0000
@@ -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
diff -r 6fa1491e871a -r a27194d60069 share/man/man9/boothowto.9
--- a/share/man/man9/boothowto.9 Fri Sep 11 16:01:58 2009 +0000
+++ b/share/man/man9/boothowto.9 Fri Sep 11 18:14:58 2009 +0000
@@ -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 ,
diff -r 6fa1491e871a -r a27194d60069 sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c Fri Sep 11 16:01:58 2009 +0000
+++ b/sys/kern/init_sysctl.c Fri Sep 11 18:14:58 2009 +0000
@@ -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"),
Home |
Main Index |
Thread Index |
Old Index