summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-29 10:40:15 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-29 10:40:15 +0200
commite0a24179c0cd874aa901ff618c64041f851537ef (patch)
tree9e9288ef13c7c63c0e59a551a47a214ade4b739a /src/machine
parente192a2815ef92ba8b2d6855be6cef0cbf3712272 (diff)
parent1f7be300e9c98a5f3b473d203dadcd9abef69baa (diff)
Merge pull request #3137 from keszybz/dirent-simplification
Various small cleanups in shared code
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machinectl.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index b03198bbf1..5a68c4ceb2 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -2516,14 +2516,9 @@ static int parse_argv(int argc, char *argv[]) {
assert(argv);
for (;;) {
- const char *option_string;
+ const char * const option_string = "+hp:als:H:M:qn:o:";
- if (reorder)
- option_string = "hp:als:H:M:qn:o:";
- else
- option_string = "+hp:als:H:M:qn:o:";
-
- c = getopt_long(argc, argv, option_string, options, NULL);
+ c = getopt_long(argc, argv, option_string + reorder, options, NULL);
if (c < 0) {
/* We generally are fine with the fact that getopt_long() reorders the command line, and looks
* for switches after the main verb. However, for "shell" we really don't want that, since we