]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: move optional file trace into uc_mgr_config_load_into
authorJaroslav Kysela <perex@perex.cz>
Fri, 12 Jun 2026 11:55:24 +0000 (13:55 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 Jun 2026 11:56:30 +0000 (13:56 +0200)
Do not duplicate traces and identify correctly the optional
include in first hit.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_include.c
src/ucm/utils.c

index d663ffc1cdd2d2c51499246d98bafa73e78fceb0..1d2558b3b5337dcba6331446989cd42718e25606 100644 (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;
 }
index 011bdab3d79943b2e0285cbf9c5b32e596011167..c386593bc17e8a7d60faf7b4e319325710953ba3 100644 (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);