X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind-action.c;h=48d9fb856e2a83f35cd0c0c62e0dfab5af12d379;hp=6b1b64229e797f4e78e43472def41ff67dc806de;hb=a5c28308446550e0966825472babdf123fc976ac;hpb=79ebfb7e4e8934a6bc0e136b121965b5292040a4 diff --git a/src/login/logind-action.c b/src/login/logind-action.c index 6b1b64229..48d9fb856 100644 --- a/src/login/logind-action.c +++ b/src/login/logind-action.c @@ -23,7 +23,7 @@ #include "bus-error.h" #include "bus-util.h" #include "conf-parser.h" -#include "formats-util.h" +#include "format-util.h" #include "logind-action.h" #include "process-util.h" #include "sleep-config.h" @@ -38,7 +38,6 @@ #include "sd-messages.h" #include "strv.h" - int manager_handle_action( Manager *m, InhibitWhat inhibit_key, @@ -112,12 +111,21 @@ int manager_handle_action( return 1; } +#if 0 /// elogind needs its own can_sleep() variant. + if (handle == HANDLE_SUSPEND) + supported = can_sleep("suspend") > 0; + else if (handle == HANDLE_HIBERNATE) + supported = can_sleep("hibernate") > 0; + else if (handle == HANDLE_HYBRID_SLEEP) + supported = can_sleep("hybrid-sleep") > 0; +#else if (handle == HANDLE_SUSPEND) supported = can_sleep(m, "suspend") > 0; else if (handle == HANDLE_HIBERNATE) supported = can_sleep(m, "hibernate") > 0; else if (handle == HANDLE_HYBRID_SLEEP) supported = can_sleep(m, "hybrid-sleep") > 0; +#endif // 0 else if (handle == HANDLE_KEXEC) supported = access(KEXEC, X_OK) >= 0; else