summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-23 20:01:40 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-24 10:20:53 -0500
commit8086ffacdb1bfec5ec115d24626538bda6cc372e (patch)
tree616defdc8b87ccd677f8a75f9eca72706a1a769c
parent9a20fcbcd1b010ad88bfbb8b7f0417bec7327fb4 (diff)
gpt-auto-generator: properly ignore value
A negative return code was treated as a true value.
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index d4cfe37298..9251ddff75 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -680,8 +680,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
r = parse_boolean(value);
if (r < 0)
log_warning("Failed to parse gpt-auto switch %s. Ignoring.", value);
-
- arg_enabled = r;
+ else
+ arg_enabled = r;
} else if (streq(key, "root") && value) {