mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-06-29 13:13:55 -04:00
ucm: move optional file trace into uc_mgr_config_load_into
Do not duplicate traces and identify correctly the optional include in first hit. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
536dd6f8af
commit
f453d78333
2 changed files with 2 additions and 4 deletions
|
|
@ -91,10 +91,8 @@ static int include_eval_one(snd_use_case_mgr_t *uc_mgr,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
err = uc_mgr_config_load_file(uc_mgr, s, result, opt_bool);
|
err = uc_mgr_config_load_file(uc_mgr, s, result, opt_bool);
|
||||||
if (opt_bool && (err == -ENOENT || err == -EACCES)) {
|
if (opt_bool && (err == -ENOENT || err == -EACCES))
|
||||||
snd_trace(UCM, "optional file '%s' not found or readable", s);
|
|
||||||
err = 0;
|
err = 0;
|
||||||
}
|
|
||||||
free(s);
|
free(s);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ int uc_mgr_config_load_into(int format, const char *file, snd_config_t *top, boo
|
||||||
if (!optional || (err != -ENOENT && err != -EACCES))
|
if (!optional || (err != -ENOENT && err != -EACCES))
|
||||||
snd_error(UCM, "could not open configuration file %s", file);
|
snd_error(UCM, "could not open configuration file %s", file);
|
||||||
else
|
else
|
||||||
snd_trace(UCM, "could not open configuration file %s", file);
|
snd_trace(UCM, "optional configuration file %s not found or readable", file);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
err = snd_input_stdio_attach(&in, fp, 1);
|
err = snd_input_stdio_attach(&in, fp, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue