summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-13 15:41:42 +0200
committerLennart Poettering <lennart@poettering.net>2014-10-13 17:19:31 +0200
commit2fc9a280cc47f455e7dffd3c4321da3f8ab65a58 (patch)
tree1920220ea6536d1eefa5575df76ed0cbec0a17b9 /src/systemctl/systemctl.c
parent70ae006b4380ed6a72211ff8aa70aac2ff381a42 (diff)
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.
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8d6d162d15..842ca6ceb8 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;