summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-start-unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl-start-unit.c')
-rw-r--r--src/systemctl/systemctl-start-unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemctl/systemctl-start-unit.c b/src/systemctl/systemctl-start-unit.c
index 6927e97747..ae7e25eedb 100644
--- a/src/systemctl/systemctl-start-unit.c
+++ b/src/systemctl/systemctl-start-unit.c
@@ -236,6 +236,7 @@ const struct action_metadata action_table[_ACTION_MAX] = {
[ACTION_HIBERNATE] = { SPECIAL_HIBERNATE_TARGET, "hibernate", "replace-irreversibly" },
[ACTION_HYBRID_SLEEP] = { SPECIAL_HYBRID_SLEEP_TARGET, "hybrid-sleep", "replace-irreversibly" },
[ACTION_SUSPEND_THEN_HIBERNATE] = { SPECIAL_SUSPEND_THEN_HIBERNATE_TARGET, "suspend-then-hibernate", "replace-irreversibly" },
+ [ACTION_SLEEP] = { NULL, /* handled only by logind */ "sleep", NULL },
};
enum action verb_to_action(const char *verb) {
@@ -294,6 +295,8 @@ int verb_start(int argc, char *argv[], void *userdata) {
action = verb_to_action(argv[0]);
+ assert(action != ACTION_SLEEP);
+
if (action != _ACTION_INVALID) {
/* A command in style "systemctl reboot", "systemctl poweroff", … */
method = "StartUnit";