X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsleep%2Fsleep.c;h=eee6bc89829ab9a8f2d24255e28d5ecc804451b6;hb=587fec427c80b6c34dcf1d7570f891fcb652a7c5;hp=2fb5f0c8e049167801a1416453cf9adcf73fdd3f;hpb=4968105790c65af58d4ab42bffa2a4bedc0be8ee;p=elogind.git diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 2fb5f0c8e..eee6bc898 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -22,10 +22,8 @@ #include #include -#include #include -#include "sd-id128.h" #include "sd-messages.h" #include "log.h" #include "util.h" @@ -92,6 +90,7 @@ static int execute(char **modes, char **states) { arg_verb, NULL }; + static const char* const dirs[] = {SYSTEM_SLEEP_PATH, NULL}; int r; _cleanup_fclose_ FILE *f = NULL; @@ -107,7 +106,7 @@ static int execute(char **modes, char **states) { if (r < 0) return r; - execute_directory(SYSTEM_SLEEP_PATH, DEFAULT_TIMEOUT_USEC, arguments); + execute_directories(dirs, DEFAULT_TIMEOUT_USEC, arguments); log_struct(LOG_INFO, LOG_MESSAGE_ID(SD_MESSAGE_SLEEP_START), @@ -126,7 +125,7 @@ static int execute(char **modes, char **states) { NULL); arguments[1] = (char*) "post"; - execute_directory(SYSTEM_SLEEP_PATH, DEFAULT_TIMEOUT_USEC, arguments); + execute_directories(dirs, DEFAULT_TIMEOUT_USEC, arguments); return r; }