diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-31 11:09:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-31 11:44:46 +0200 |
commit | 542bb9be7cd0c05e3fb1beb849b70d79fec42189 (patch) | |
tree | 76e1b206149736b45805265fb9c2af69628442a8 /src/veritysetup | |
parent | veritysetup: do some superficial checking on volume name (diff) | |
download | systemd-542bb9be7cd0c05e3fb1beb849b70d79fec42189.tar.xz systemd-542bb9be7cd0c05e3fb1beb849b70d79fec42189.zip |
tree-wide: unify some code that looks for --help in the command line
Diffstat (limited to 'src/veritysetup')
-rw-r--r-- | src/veritysetup/veritysetup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/veritysetup/veritysetup.c b/src/veritysetup/veritysetup.c index a81e93cb75..1d1baaa59d 100644 --- a/src/veritysetup/veritysetup.c +++ b/src/veritysetup/veritysetup.c @@ -12,6 +12,7 @@ #include "main-func.h" #include "path-util.h" #include "pretty-print.h" +#include "process-util.h" #include "string-util.h" #include "terminal-util.h" @@ -114,10 +115,7 @@ static int run(int argc, char *argv[]) { const char *verb; int r; - if (argc <= 1 || - strv_contains(strv_skip(argv, 1), "--help") || - strv_contains(strv_skip(argv, 1), "-h") || - streq(argv[1], "help")) + if (argv_looks_like_help(argc, argv)) return help(); if (argc < 3) |