]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: fix 'cat-config systemd/zram-generator.conf'
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 1 Aug 2020 10:25:56 +0000 (12:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Aug 2020 18:23:52 +0000 (20:23 +0200)
Also makes this work for various systemd config files that support .d.

src/shared/pretty-print.c

index 69bae6883c26032a8a952a32abb98a3a1a8cba87..edba23985f33f0faafccdc7b1b4b19ac05286246 100644 (file)
@@ -234,6 +234,12 @@ static int guess_type(const char **name, char ***prefixes, bool *is_collection,
         if (!n)
                 return log_oom();
 
+        /* All systemd-style config files should support the /usr-/etc-/run split and
+         * dropins. Let's add a blanket rule that allows us to support them without keeping
+         * an explicit list. */
+        if (path_startswith(n, "systemd") && endswith(n, ".conf"))
+                usr = true;
+
         delete_trailing_chars(n, "/");
 
         if (endswith(n, ".d"))