From 4002c39216ef9396cae0e63d628b7019c6ed346d Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Mon, 17 Jul 2006 17:28:44 +0000 Subject: [PATCH] Prepend temporary sysctls with an underscore. Submitted by: Yuriy Tsibizov --- sys/dev/sound/pci/emu10kx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c index dcc532283685..8071efa9e1b9 100644 --- a/sys/dev/sound/pci/emu10kx.c +++ b/sys/dev/sound/pci/emu10kx.c @@ -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",""); }