diff options
author | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
commit | fc21f40567ac7485e9e987cf5a539bd0d11c7155 (patch) | |
tree | fce5301b062a855bc68b9cb76c6b5966c5a2acbe /sys/kern/subr_prf.c | |
parent | 2f456747e010bfa5a9dd3498aa5650e0ade39f22 (diff) | |
download | FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.zip FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.tar.gz |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:
1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 814e57f..28e33a4 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -102,20 +102,23 @@ static void snprintf_func(int ch, void *arg); static int msgbufmapped; /* Set when safe to use msgbuf */ int msgbuftrigger; -static int log_console_output = 1; -SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RWTUN, - &log_console_output, 0, "Duplicate console output to the syslog"); +static int log_console_output = 1; +TUNABLE_INT("kern.log_console_output", &log_console_output); +SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RW, + &log_console_output, 0, "Duplicate console output to the syslog."); /* * See the comment in log_console() below for more explanation of this. */ -static int log_console_add_linefeed; -SYSCTL_INT(_kern, OID_AUTO, log_console_add_linefeed, CTLFLAG_RWTUN, - &log_console_add_linefeed, 0, "log_console() adds extra newlines"); - -static int always_console_output; -SYSCTL_INT(_kern, OID_AUTO, always_console_output, CTLFLAG_RWTUN, - &always_console_output, 0, "Always output to console despite TIOCCONS"); +static int log_console_add_linefeed = 0; +TUNABLE_INT("kern.log_console_add_linefeed", &log_console_add_linefeed); +SYSCTL_INT(_kern, OID_AUTO, log_console_add_linefeed, CTLFLAG_RW, + &log_console_add_linefeed, 0, "log_console() adds extra newlines."); + +static int always_console_output = 0; +TUNABLE_INT("kern.always_console_output", &always_console_output); +SYSCTL_INT(_kern, OID_AUTO, always_console_output, CTLFLAG_RW, + &always_console_output, 0, "Always output to console despite TIOCCONS."); /* * Warn that a system table is full. |