diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 751f01924d36..5f4bf63bed0f 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -93,7 +93,11 @@ int cons_avail_mask = 0; /* Bit mask. Each registered low level console * (i.e., if it is in graphics mode) will have * this bit cleared. */ + static int cn_mute; +SYSCTL_INT(_kern, OID_AUTO, consmute, CTLFLAG_RW, &cn_mute, 0, + "State of the console muting"); + static char *consbuf; /* buffer used by `consmsgbuf' */ static struct callout conscallout; /* callout for outputting to constty */ struct msgbuf consmsgbuf; /* message buffer for console tty */ @@ -365,26 +369,6 @@ SYSCTL_PROC(_kern, OID_AUTO, console, sysctl_kern_console, "A", "Console device control"); -/* - * User has changed the state of the console muting. - * This may require us to open or close the device in question. - */ -static int -sysctl_kern_consmute(SYSCTL_HANDLER_ARGS) -{ - int error; - - error = sysctl_handle_int(oidp, &cn_mute, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - return (error); -} - -SYSCTL_PROC(_kern, OID_AUTO, consmute, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(cn_mute), - sysctl_kern_consmute, "I", - "State of the console muting"); - void cngrab() {