Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pcm/sndstat.c
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | sysctl_hw_sndverbose(SYSCTL_HANDLER_ARGS) | ||||
if (error == 0 && req->newptr != NULL) { | if (error == 0 && req->newptr != NULL) { | ||||
if (verbose < 0 || verbose > 4) | if (verbose < 0 || verbose > 4) | ||||
error = EINVAL; | error = EINVAL; | ||||
else | else | ||||
snd_verbose = verbose; | snd_verbose = verbose; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RWTUN, | SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, | ||||
0, sizeof(int), sysctl_hw_sndverbose, "I", "verbosity level"); | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | ||||
0, sizeof(int), sysctl_hw_sndverbose, "I", | |||||
"verbosity level"); | |||||
static int | static int | ||||
sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) | sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) | ||||
{ | { | ||||
struct sndstat_file *pf; | struct sndstat_file *pf; | ||||
pf = malloc(sizeof(*pf), M_DEVBUF, M_WAITOK | M_ZERO); | pf = malloc(sizeof(*pf), M_DEVBUF, M_WAITOK | M_ZERO); | ||||
▲ Show 20 Lines • Show All 315 Lines • Show Last 20 Lines |