Date: Mon, 5 Oct 2020 15:54:19 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366450 - head/sys/kern Message-ID: <202010051554.095FsJ8h008671@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Oct 5 15:54:19 2020 New Revision: 366450 URL: https://svnweb.freebsd.org/changeset/base/366450 Log: 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 Modified: head/sys/kern/kern_cons.c Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Mon Oct 5 14:07:32 2020 (r366449) +++ head/sys/kern/kern_cons.c Mon Oct 5 15:54:19 2020 (r366450) @@ -93,7 +93,11 @@ int cons_avail_mask = 0; /* Bit mask. Each registered * (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 */ @@ -364,26 +368,6 @@ SYSCTL_PROC(_kern, OID_AUTO, console, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, 0, 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()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010051554.095FsJ8h008671>