diff options
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machinectl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 7eb2235667..71b9d0d4c1 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -2718,6 +2718,10 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); + /* Resetting to 0 forces the invocation of an internal initialization routine of getopt_long() + * that checks for GNU extensions in optstring ('-' or '+' at the beginning). */ + optind = 0; + for (;;) { static const char option_string[] = "-hp:als:H:M:qn:o:E:"; |