Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_cons.c
Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | SET_FOREACH(list, cons_set) { | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
sbuf_delete(sb); | sbuf_delete(sb); | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_kern, OID_AUTO, console, CTLTYPE_STRING|CTLFLAG_RW, | SYSCTL_PROC(_kern, OID_AUTO, console, | ||||
0, 0, sysctl_kern_console, "A", "Console device control"); | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
0, 0, sysctl_kern_console, "A", | |||||
"Console device control"); | |||||
/* | /* | ||||
* User has changed the state of the console muting. | * User has changed the state of the console muting. | ||||
* This may require us to open or close the device in question. | * This may require us to open or close the device in question. | ||||
*/ | */ | ||||
static int | static int | ||||
sysctl_kern_consmute(SYSCTL_HANDLER_ARGS) | sysctl_kern_consmute(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
int error; | int error; | ||||
error = sysctl_handle_int(oidp, &cn_mute, 0, req); | error = sysctl_handle_int(oidp, &cn_mute, 0, req); | ||||
if (error != 0 || req->newptr == NULL) | if (error != 0 || req->newptr == NULL) | ||||
return (error); | return (error); | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW, | SYSCTL_PROC(_kern, OID_AUTO, consmute, | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
0, sizeof(cn_mute), sysctl_kern_consmute, "I", | 0, sizeof(cn_mute), sysctl_kern_consmute, "I", | ||||
"State of the console muting"); | "State of the console muting"); | ||||
void | void | ||||
cngrab() | cngrab() | ||||
{ | { | ||||
struct cn_device *cnd; | struct cn_device *cnd; | ||||
struct consdev *cn; | struct consdev *cn; | ||||
STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { | STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |