summaryrefslogtreecommitdiff
path: root/src/cryptsetup
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptsetup')
-rw-r--r--src/cryptsetup/cryptsetup-generator.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 7193d93070..e2dc4327fe 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -282,7 +282,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
crypto_device *d;
_cleanup_free_ char *uuid = NULL, *uuid_value = NULL;
- if (STR_IN_SET(key, "luks", "rd.luks") && value) {
+ if (streq(key, "luks") && value) {
r = parse_boolean(value);
if (r < 0)
@@ -290,7 +290,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
else
arg_enabled = r;
- } else if (STR_IN_SET(key, "luks.crypttab", "rd.luks.crypttab") && value) {
+ } else if (streq(key, "luks.crypttab") && value) {
r = parse_boolean(value);
if (r < 0)
@@ -298,7 +298,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
else
arg_read_crypttab = r;
- } else if (STR_IN_SET(key, "luks.uuid", "rd.luks.uuid") && value) {
+ } else if (streq(key, "luks.uuid") && value) {
d = get_crypto_device(startswith(value, "luks-") ? value+5 : value);
if (!d)
@@ -306,7 +306,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
d->create = arg_whitelist = true;
- } else if (STR_IN_SET(key, "luks.options", "rd.luks.options") && value) {
+ } else if (streq(key, "luks.options") && value) {
r = sscanf(value, "%m[0-9a-fA-F-]=%ms", &uuid, &uuid_value);
if (r == 2) {
@@ -320,7 +320,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
} else if (free_and_strdup(&arg_default_options, value) < 0)
return log_oom();
- } else if (STR_IN_SET(key, "luks.key", "rd.luks.key") && value) {
+ } else if (streq(key, "luks.key") && value) {
r = sscanf(value, "%m[0-9a-fA-F-]=%ms", &uuid, &uuid_value);
if (r == 2) {
@@ -334,7 +334,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
} else if (free_and_strdup(&arg_default_keyfile, value) < 0)
return log_oom();
- } else if (STR_IN_SET(key, "luks.name", "rd.luks.name") && value) {
+ } else if (streq(key, "luks.name") && value) {
r = sscanf(value, "%m[0-9a-fA-F-]=%ms", &uuid, &uuid_value);
if (r == 2) {
@@ -478,7 +478,7 @@ int main(int argc, char *argv[]) {
if (!arg_disks)
goto cleanup;
- r = parse_proc_cmdline(parse_proc_cmdline_item, NULL);
+ r = parse_proc_cmdline(parse_proc_cmdline_item, NULL, true);
if (r < 0) {
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
r = EXIT_FAILURE;