]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto-generator: improve debug messages a bit
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Nov 2019 12:17:28 +0000 (13:17 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 Nov 2019 16:33:26 +0000 (17:33 +0100)
In particular, let's give a hint when we do nothing in the common case of
root= being used.

src/gpt-auto-generator/gpt-auto-generator.c

index 1dd98eeb1f0e6c0601318c3a4c52bf824bfc7cb7..5f27edc9ee13359a9d07724ac504421e15e99d2c 100644 (file)
@@ -225,7 +225,7 @@ static int add_mount(
         assert(where);
         assert(description);
 
-        log_debug("Adding %s: %s %s", where, what, strna(fstype));
+        log_debug("Adding %s: %s fstype=%s", where, what, fstype ?: "(any)");
 
         if (streq_ptr(fstype, "crypto_LUKS")) {
 
@@ -765,7 +765,10 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
                 /* Disable root disk logic if there's a root= value
                  * specified (unless it happens to be "gpt-auto") */
 
-                arg_root_enabled = streq(value, "gpt-auto");
+                if (!streq(value, "gpt-auto")) {
+                        arg_root_enabled = false;
+                        log_debug("Disabling root partition auto-detection, root= is defined.");
+                }
 
         } else if (proc_cmdline_key_streq(key, "roothash")) {