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=bcf7b86a3b1d205bd259072345a077cab9464dce;hp=82c061d62677b6907942391fbaddfde9d3060461;hb=6b0862dad14eedfa49119f13dfcaf572c7313669;hpb=8ba463e9bdde6e98e36124a5b2cf49ba1a2f7b88 diff --git a/src/login/logind-action.c b/src/login/logind-action.c index 82c061d62..bcf7b86a3 100644 --- a/src/login/logind-action.c +++ b/src/login/logind-action.c @@ -111,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