diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-23 18:51:30 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-18 14:38:30 +0100 |
commit | 8a9c44edf90d122f80a0234f5416eabb0d6061e0 (patch) | |
tree | c34e0bc5819ede8abd3401b16bb55640fa400fd1 /src | |
parent | Merge pull request #11197 from keszybz/various-fixups (diff) | |
download | systemd-8a9c44edf90d122f80a0234f5416eabb0d6061e0.tar.gz systemd-8a9c44edf90d122f80a0234f5416eabb0d6061e0.tar.bz2 systemd-8a9c44edf90d122f80a0234f5416eabb0d6061e0.zip |
gpt-auto: compare kernel cmdline args with proc_cmdline_key_streq()
Diffstat (limited to 'src')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index a6d7bcc75..28479386b 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -558,7 +558,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat assert(key); - if (STR_IN_SET(key, "systemd.gpt_auto", "rd.systemd.gpt_auto")) { + if (proc_cmdline_key_streq(key, "systemd.gpt_auto") || + proc_cmdline_key_streq(key, "rd.systemd.gpt_auto")) { r = value ? parse_boolean(value) : 1; if (r < 0) @@ -566,7 +567,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat else arg_enabled = r; - } else if (streq(key, "root")) { + } else if (proc_cmdline_key_streq(key, "root")) { if (proc_cmdline_value_missing(key, value)) return 0; @@ -576,7 +577,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat arg_root_enabled = streq(value, "gpt-auto"); - } else if (streq(key, "roothash")) { + } else if (proc_cmdline_key_streq(key, "roothash")) { if (proc_cmdline_value_missing(key, value)) return 0; @@ -585,9 +586,9 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat arg_root_enabled = false; - } else if (streq(key, "rw") && !value) + } else if (proc_cmdline_key_streq(key, "rw") && !value) arg_root_rw = true; - else if (streq(key, "ro") && !value) + else if (proc_cmdline_key_streq(key, "ro") && !value) arg_root_rw = false; return 0; |