tmpfiles: properly prefix paths in debug outputs
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Jul 2020 15:53:21 +0000 (17:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Dec 2020 13:22:38 +0000 (14:22 +0100)
This is otherwise very confusing...

(cherry picked from commit b8e35011f726925d4c1640c5b721c18f7da9bd97)

src/tmpfiles/tmpfiles.c

index 2db3773fcb60d8437f8b06da806f3227b52c0484..9a7f73415aac2889061b832ab523dc42b5889f9d 100644 (file)
@@ -3246,10 +3246,20 @@ static int run(int argc, char *argv[]) {
 
         if (DEBUG_LOGGING) {
                 _cleanup_free_ char *t = NULL;
+                char **i;
 
-                t = strv_join(config_dirs, "\n\t");
-                if (t)
-                        log_debug("Looking for configuration files in (higher priority first):\n\t%s", t);
+                STRV_FOREACH(i, config_dirs) {
+                        _cleanup_free_ char *j = NULL;
+
+                        j = path_join(arg_root, *i);
+                        if (!j)
+                                return log_oom();
+
+                        if (!strextend(&t, "\n\t", j, NULL))
+                                return log_oom();
+                }
+
+                log_debug("Looking for configuration files in (higher priority first):%s", t);
         }
 
         if (arg_cat_config) {