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.
This commit is contained in:
parent
e553df3559
commit
7ab65de0a9
@ -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 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
|
||||
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]
|
||||
|
@ -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 @@ If set to 0, automatic lowering of priority is not performed, and if set to \-1
|
||||
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
|
||||
|
@ -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 @@ and
|
||||
.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 @@ This flag is currently not used by any ports.
|
||||
.Xr ddb 4 ,
|
||||
.\" RB_USERCONF
|
||||
.Xr userconf 4 ,
|
||||
.\" sysctl kern.boothowto
|
||||
.Xr sysctl 7
|
||||
.\" sets boothowto
|
||||
.Xr boot 8 ,
|
||||
.\" .Xr crash 8 ,
|
||||
|
@ -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"
|
||||
@ -445,6 +445,12 @@ SYSCTL_SETUP(sysctl_kern_setup, "sysctl kern subtree setup")
|
||||
0,
|
||||
#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",
|
||||
|
Loading…
Reference in New Issue
Block a user