diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-05-31 12:06:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-31 12:06:37 +0200 |
commit | b3c66c44970497c0100dd16fb6c6bc10853588c8 (patch) | |
tree | b50b4e6ad34bd98a142ab8ee3a9de7810770a416 | |
parent | f524522bde1a29ec1589db95a787a89444617d04 (diff) | |
download | systemd-b3c66c44970497c0100dd16fb6c6bc10853588c8.tar.gz |
portablectl: no need to validate profile name before checking whether it is 'help'
-rw-r--r-- | src/portable/portablectl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 04a261297c..4051875b76 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -884,14 +884,14 @@ static int parse_argv(int argc, char *argv[]) { break; case 'p': + if (streq(optarg, "help")) + return dump_profiles(); + if (!filename_is_valid(optarg)) { log_error("Unit profile name not valid: %s", optarg); return -EINVAL; } - if (streq(optarg, "help")) - return dump_profiles(); - arg_profile = optarg; break; |