ucm: add some traces for the config filenames

It is handy to see the path names in the loading chain.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2026-01-08 13:56:48 +01:00
parent 8bea4b13d1
commit 50b532de79
2 changed files with 3 additions and 0 deletions

View file

@ -3417,6 +3417,7 @@ static int parse_toplevel_path(snd_use_case_mgr_t *uc_mgr,
} }
ucm_filename(fn, sizeof(fn), version, dir, file); ucm_filename(fn, sizeof(fn), version, dir, file);
snd_trace(UCM, "probing configuration file '%s'", fn);
if (access(fn, R_OK) == 0 && lstat64(fn, &st) == 0) { if (access(fn, R_OK) == 0 && lstat64(fn, &st) == 0) {
if (S_ISLNK(st.st_mode)) { if (S_ISLNK(st.st_mode)) {
ssize_t r; ssize_t r;
@ -3448,6 +3449,7 @@ static int parse_toplevel_path(snd_use_case_mgr_t *uc_mgr,
} }
free(link); free(link);
} }
snd_trace(UCM, "using directory '%s' and file '%s'", dir, file);
if (replace_string(&uc_mgr->conf_dir_name, dir) == NULL) if (replace_string(&uc_mgr->conf_dir_name, dir) == NULL)
goto __enomem; goto __enomem;
if (replace_string(&uc_mgr->conf_file_name, file) == NULL) if (replace_string(&uc_mgr->conf_file_name, file) == NULL)

View file

@ -364,6 +364,7 @@ int uc_mgr_config_load_into(int format, const char *file, snd_config_t *top)
const char *default_paths[2]; const char *default_paths[2];
int err; int err;
snd_trace(UCM, "loading config '%s'", file);
fp = fopen(file, "r"); fp = fopen(file, "r");
if (!fp) { if (!fp) {
err = -errno; err = -errno;