ucm: move optional file trace into uc_mgr_config_load_into
Some checks failed
Build alsa-lib / fedora_latest_build (push) Has been cancelled
Build alsa-lib / ubuntu_last_build (push) Has been cancelled

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:
Jaroslav Kysela 2026-06-12 13:55:24 +02:00
parent 536dd6f8af
commit f453d78333
2 changed files with 2 additions and 4 deletions

View file

@ -91,10 +91,8 @@ static int include_eval_one(snd_use_case_mgr_t *uc_mgr,
if (err < 0)
return err;
err = uc_mgr_config_load_file(uc_mgr, s, result, opt_bool);
if (opt_bool && (err == -ENOENT || err == -EACCES)) {
snd_trace(UCM, "optional file '%s' not found or readable", s);
if (opt_bool && (err == -ENOENT || err == -EACCES))
err = 0;
}
free(s);
return err;
}

View file

@ -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))
snd_error(UCM, "could not open configuration file %s", file);
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;
}
err = snd_input_stdio_attach(&in, fp, 1);