chiark / gitweb /
logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
[elogind.git] / src / login / loginctl.c
index e11ce2a9b99f5d31c39e27f8f6c0bee307eaeaa1..9c7652777d4245c3bd176ad91f186c5d728c0e42 100644 (file)
@@ -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;