X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Floginctl.c;h=9c7652777d4245c3bd176ad91f186c5d728c0e42;hb=edda707302d7c5138291c0ff4e9c43db9fba51d8;hp=e11ce2a9b99f5d31c39e27f8f6c0bee307eaeaa1;hpb=4bf53966f770f9956fd50e9225d5938d2fb3e794;p=elogind.git diff --git a/src/login/loginctl.c b/src/login/loginctl.c index e11ce2a9b..9c7652777 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -42,6 +42,8 @@ #include "cgroup-util.h" #include "spawn-polkit-agent.h" #include "verbs.h" +#include "process-util.h" +#include "terminal-util.h" static char **arg_property = NULL; static bool arg_all = false; @@ -1257,7 +1259,7 @@ static int poweroff(int argc, char *argv[], void *userdata) { assert(bus); - r = check_inhibitors(bus, "shutdown", "poweroff"); + r = check_inhibitors(bus, "poweroff", "shutdown"); if (r < 0) return r; @@ -1286,7 +1288,7 @@ static int reboot(int argc, char *argv[], void *userdata) { assert(bus); - r = check_inhibitors(bus, "shutdown", "reboot"); + r = check_inhibitors(bus, "reboot", "shutdown"); if (r < 0) return r; @@ -1315,7 +1317,7 @@ static int suspend(int argc, char *argv[], void *userdata) { assert(bus); - r = check_inhibitors(bus, "sleep", "suspend"); + r = check_inhibitors(bus, "suspend", "sleep"); if (r < 0) return r; @@ -1344,7 +1346,7 @@ static int hibernate(int argc, char *argv[], void *userdata) { assert(bus); - r = check_inhibitors(bus, "sleep", "hibernate"); + r = check_inhibitors(bus, "hibernate", "sleep"); if (r < 0) return r; @@ -1373,7 +1375,7 @@ static int hybrid_sleep(int argc, char *argv[], void *userdata) { assert(bus); - r = check_inhibitors(bus, "sleep", "hybrid-sleep"); + r = check_inhibitors(bus, "hybrid-sleep", "sleep"); if (r < 0) return r;