Remove sysctl_kern_consmute()

It is a trivial wrapper for sysctl_handle_int() since r184521.  Also
remove the NEEDGIANT flag, cn_mute is accessed locklessly.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2020-10-05 15:54:19 +00:00
parent fd92b91c71
commit 780766eb52

View File

@ -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()
{