]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine-id-setup: avoid unexpected aborting
authorChen Qi <Qi.Chen@windriver.com>
Thu, 24 Oct 2019 09:40:05 +0000 (17:40 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 Oct 2019 04:35:37 +0000 (13:35 +0900)
Code should not be reached 'Unhandled option' at src/machine-id-setup/machine-id-setup-main.c:97, function parse_argv(). Aborting.
Aborted

This behaviour is not good and will confuse user.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/machine-id-setup/machine-id-setup-main.c

index 1b575d772516b09aade7db265d95a97088b4e8df..872b00c158e4df42a0a37b8fc3652bbc34503d7e 100644 (file)
@@ -66,7 +66,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {