replace SNDMSG,SYSMSG,SNDERR,SYSERR with new log macros

... with interface identifiers

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2025-11-06 15:57:13 +01:00
parent 492df4bb94
commit 62c8e635dc
82 changed files with 1292 additions and 1201 deletions

View file

@ -931,7 +931,7 @@ static PyObject *new_helem(struct python_priv *priv, snd_hctl_elem_t *helem)
}
Py_XDECREF(obj1);
} else {
SNDERR("Unable to create InternalMixer object");
snd_error(MIXER, "Unable to create InternalMixer object");
return NULL;
}
if (obj2) {
@ -1073,7 +1073,7 @@ static int alsa_mixer_simple_pyinit(struct python_priv *priv,
PyDict_SetItemString(mdict, "mixer", obj2);
priv->py_mixer = obj2;
} else {
SNDERR("Unable to create InternalMixer object");
snd_error(MIXER, "Unable to create InternalMixer object");
return -EIO;
}
@ -1083,7 +1083,7 @@ static int alsa_mixer_simple_pyinit(struct python_priv *priv,
Py_XDECREF(obj);
priv->py_event_func = PyDict_GetItemString(mdict, "event");
if (priv->py_event_func == NULL) {
SNDERR("Unable to find python function 'event'");
snd_error(MIXER, "Unable to find python function 'event'");
return -EIO;
}
return 0;
@ -1128,7 +1128,7 @@ int alsa_mixer_simple_finit(snd_mixer_class_t *class,
fp = fopen(file, "r");
if (fp == NULL) {
SNDERR("Unable to find python module '%s'", file);
snd_error(MIXER, "Unable to find python module '%s'", file);
return -ENODEV;
}

View file

@ -65,27 +65,27 @@ int mixer_simple_basic_dlopen(snd_mixer_class_t *class,
strcat(xlib, lib);
h = snd_dlopen(xlib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h == NULL) {
SNDERR("Unable to open library '%s': %s", xlib, errbuf);
snd_error(MIXER, "Unable to open library '%s': %s", xlib, errbuf);
goto __error;
}
initpriv = dlsym(h, "alsa_mixer_sbasic_initpriv");
if (initpriv == NULL) {
SNDERR("Symbol 'alsa_mixer_sbasic_initpriv' was not found in '%s'", xlib);
snd_error(MIXER, "Symbol 'alsa_mixer_sbasic_initpriv' was not found in '%s'", xlib);
goto __error;
}
priv->ops.event = dlsym(h, "alsa_mixer_sbasic_event");
if (priv->ops.event == NULL) {
SNDERR("Symbol 'alsa_mixer_sbasic_event' was not found in '%s'", xlib);
snd_error(MIXER, "Symbol 'alsa_mixer_sbasic_event' was not found in '%s'", xlib);
goto __error;
}
priv->ops.selreg = dlsym(h, "alsa_mixer_sbasic_selreg");
if (priv->ops.selreg == NULL) {
SNDERR("Symbol 'alsa_mixer_sbasic_selreg' was not found in '%s'", xlib);
snd_error(MIXER, "Symbol 'alsa_mixer_sbasic_selreg' was not found in '%s'", xlib);
goto __error;
}
priv->ops.sidreg = dlsym(h, "alsa_mixer_sbasic_sidreg");
if (priv->ops.sidreg == NULL) {
SNDERR("Symbol 'alsa_mixer_sbasic_sidreg' was not found in '%s'", xlib);
snd_error(MIXER, "Symbol 'alsa_mixer_sbasic_sidreg' was not found in '%s'", xlib);
goto __error;
}
free(xlib);