aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_cons.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-10-05 15:54:19 +0000
committerMark Johnston <markj@FreeBSD.org>2020-10-05 15:54:19 +0000
commit780766eb520eab70c00ff521036ac9e35b14f9a7 (patch)
treebbd42e4816e015b876839265a5b5c4991f4a6e8b /sys/kern/kern_cons.c
parentfd92b91c712386ce1be1cbae72597b6b1a39df4d (diff)
downloadsrc-780766eb520eab70c00ff521036ac9e35b14f9a7.tar.gz
src-780766eb520eab70c00ff521036ac9e35b14f9a7.zip
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
Notes
Notes: svn path=/head/; revision=366450
Diffstat (limited to 'sys/kern/kern_cons.c')
-rw-r--r--sys/kern/kern_cons.c24
1 files changed, 4 insertions, 20 deletions
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()
{