From 2fc9a280cc47f455e7dffd3c4321da3f8ab65a58 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 13 Oct 2014 15:41:42 +0200 Subject: [PATCH] systemctl: move unit action table closer to the functions that use them All other static tables we placed next to the functions that access them, so let's do this for the unit action table too. --- src/systemctl/systemctl.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 8d6d162d1..842ca6ceb 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -137,23 +137,6 @@ static unsigned arg_lines = 10; static OutputMode arg_output = OUTPUT_SHORT; static bool arg_plain = false; -static const struct { - const char *verb; - const char *method; -} unit_actions[] = { - { "start", "StartUnit" }, - { "stop", "StopUnit" }, - { "condstop", "StopUnit" }, - { "reload", "ReloadUnit" }, - { "restart", "RestartUnit" }, - { "try-restart", "TryRestartUnit" }, - { "condrestart", "TryRestartUnit" }, - { "reload-or-restart", "ReloadOrRestartUnit" }, - { "reload-or-try-restart", "ReloadOrTryRestartUnit" }, - { "condreload", "ReloadOrTryRestartUnit" }, - { "force-reload", "ReloadOrTryRestartUnit" } -}; - static bool original_stdout_is_tty; static int daemon_reload(sd_bus *bus, char **args); @@ -2539,6 +2522,23 @@ static int check_triggering_units( return 0; } +static const struct { + const char *verb; + const char *method; +} unit_actions[] = { + { "start", "StartUnit" }, + { "stop", "StopUnit" }, + { "condstop", "StopUnit" }, + { "reload", "ReloadUnit" }, + { "restart", "RestartUnit" }, + { "try-restart", "TryRestartUnit" }, + { "condrestart", "TryRestartUnit" }, + { "reload-or-restart", "ReloadOrRestartUnit" }, + { "reload-or-try-restart", "ReloadOrTryRestartUnit" }, + { "condreload", "ReloadOrTryRestartUnit" }, + { "force-reload", "ReloadOrTryRestartUnit" } +}; + static const char *verb_to_method(const char *verb) { uint i; -- 2.30.2