summaryrefslogtreecommitdiffstats
path: root/src/sleep/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sleep/sleep.c')
-rw-r--r--src/sleep/sleep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 31dca446f2..6864f631f1 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -233,7 +233,7 @@ static int execute(
/* This file is opened first, so that if we hit an error, we can abort before modifying any state. */
state_fd = open("/sys/power/state", O_WRONLY|O_CLOEXEC);
if (state_fd < 0)
- return -errno;
+ return log_error_errno(errno, "Failed to open /sys/power/state: %m");
/* Configure hibernation settings if we are supposed to hibernate */
if (sleep_operation_is_hibernation(operation)) {