diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-04-03 14:43:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-04-03 14:43:48 +0200 |
commit | 568b679f2a5db6a23c795363091b94ad804f24f6 (patch) | |
tree | 0eb7c2db234c9a00f016f81cd933c249e9887978 /src/systemctl.c | |
parent | 08f23fd29c9df9c8b4e874933eb39711f069754b (diff) |
systemctl: make -f short for both --follow and --force
Diffstat (limited to 'src/systemctl.c')
-rw-r--r-- | src/systemctl.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index f51085f8c4..4b27b69c55 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4247,7 +4247,8 @@ static int systemctl_parse_argv(int argc, char *argv[]) { ARG_NO_ASK_PASSWORD, ARG_FAILED, ARG_RUNTIME, - ARG_FOLLOW + ARG_FOLLOW, + ARG_FORCE }; static const struct option options[] = { @@ -4271,7 +4272,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { { "order", no_argument, NULL, ARG_ORDER }, { "require", no_argument, NULL, ARG_REQUIRE }, { "root", required_argument, NULL, ARG_ROOT }, - { "force", no_argument, NULL, 'f' }, + { "force", no_argument, NULL, ARG_FORCE }, { "no-reload", no_argument, NULL, ARG_NO_RELOAD }, { "kill-mode", required_argument, NULL, ARG_KILL_MODE }, /* undocumented on purpose */ { "kill-who", required_argument, NULL, ARG_KILL_WHO }, @@ -4392,8 +4393,18 @@ static int systemctl_parse_argv(int argc, char *argv[]) { arg_quiet = true; break; + case ARG_FORCE: + arg_force ++; + break; + + case ARG_FOLLOW: + arg_follow = true; + break; + case 'f': + /* -f is short for both --follow and --force! */ arg_force ++; + arg_follow = true; break; case ARG_NO_RELOAD: @@ -4439,10 +4450,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { } break; - case ARG_FOLLOW: - arg_follow = true; - break; - case 'o': arg_output = output_mode_from_string(optarg); if (arg_output < 0) { |