1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Prepend temporary sysctls with an underscore.

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
This commit is contained in:
Alexander Leidinger 2006-07-17 17:28:44 +00:00
parent fe78538353
commit 4002c39216
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160438

View File

@ -1430,15 +1430,20 @@ static int
emu_addefxmixer(struct emu_sc_info *sc, const char *mix_name, const int mix_id, uint32_t defvolume)
{
int volgpr;
char sysctl_name[32];
volgpr = emu_rm_gpr_alloc(sc->rm, 1);
emumix_set_fxvol(sc, volgpr, defvolume);
/* Mixer controls with NULL mix_name are handled by AC97 emulation
code or PCM mixer. */
if (mix_name != NULL) {
/* Temporary sysctls should start with underscore,
* see freebsd-current mailing list, emu10kx driver
* discussion around May, 24th. */
snprintf(sysctl_name, 32, "_%s", mix_name);
SYSCTL_ADD_PROC(sc->ctx,
SYSCTL_CHILDREN(sc->root),
OID_AUTO, mix_name,
OID_AUTO, sysctl_name,
CTLTYPE_INT | CTLFLAG_RW, sc, mix_id,
sysctl_emu_mixer_control, "I","");
}