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/integritysetup/integritysetup.c | |
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/integritysetup/integritysetup.c')
-rw-r--r-- | src/integritysetup/integritysetup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/integritysetup/integritysetup.c b/src/integritysetup/integritysetup.c index d8cfd12e95..7eff0ce5dc 100644 --- a/src/integritysetup/integritysetup.c +++ b/src/integritysetup/integritysetup.c @@ -12,9 +12,10 @@ #include "log.h" #include "main-func.h" #include "memory-util.h" -#include "path-util.h" #include "parse-util.h" +#include "path-util.h" #include "pretty-print.h" +#include "process-util.h" #include "string-util.h" #include "terminal-util.h" @@ -90,10 +91,7 @@ static int run(int argc, char *argv[]) { int r; char *action, *volume; - 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) |