diff options
author | Daniel Mack <github@zonque.org> | 2015-10-01 16:35:43 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-10-01 16:35:43 +0200 |
commit | e46831f0f1e2ef0a6cd333b639af1327745ccb5b (patch) | |
tree | b7178058d4d278763c4c294b0c87a7674404e3f0 /src/systemctl | |
parent | 8f4cc914724c77cc75d9ffc31e339012be6d2dc1 (diff) | |
parent | 91d0d699121f9cf29e3ba45380ce503b8ea505fe (diff) |
Merge pull request #1438 from poettering/rfkill-rework
An rfkill rework among other things
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0615dd6aa5..420a246be1 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6648,7 +6648,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { } if (unit_type_from_string(type) >= 0) { - if (strv_push(&arg_types, type)) + if (strv_push(&arg_types, type) < 0) return log_oom(); type = NULL; continue; @@ -6658,7 +6658,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { * load states, but let's support this * in --types= too for compatibility * with old versions */ - if (unit_load_state_from_string(optarg) >= 0) { + if (unit_load_state_from_string(type) >= 0) { if (strv_push(&arg_states, type) < 0) return log_oom(); type = NULL; @@ -6871,8 +6871,10 @@ static int systemctl_parse_argv(int argc, char *argv[]) { return 0; } - if (strv_consume(&arg_states, s) < 0) + if (strv_push(&arg_states, s) < 0) return log_oom(); + + s = NULL; } break; } |