Add a sysctl which disables the logging of console output.

Approved by:	phk
MFC after:	2 weeks
This commit is contained in:
David Malone 2002-04-29 09:15:38 +00:00
parent 1cf1a725ff
commit dbe620d321

View File

@ -94,6 +94,10 @@ static int consintr = 1; /* Ok to handle console interrupts? */
static int msgbufmapped; /* Set when safe to use msgbuf */ static int msgbufmapped; /* Set when safe to use msgbuf */
int msgbuftrigger; int msgbuftrigger;
static int log_console_output = 1;
SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RW,
&log_console_output, 0, "");
/* /*
* Warn that a system table is full. * Warn that a system table is full.
*/ */
@ -242,6 +246,9 @@ log_console(struct uio *uio)
char *consbuffer; char *consbuffer;
int pri; int pri;
if (!log_console_output)
return;
pri = LOG_INFO | LOG_CONSOLE; pri = LOG_INFO | LOG_CONSOLE;
muio = *uio; muio = *uio;
iovlen = uio->uio_iovcnt * sizeof (struct iovec); iovlen = uio->uio_iovcnt * sizeof (struct iovec);