From: Lennart Poettering Date: Fri, 21 May 2021 16:39:06 +0000 (+0200) Subject: sleep: remove duplicate logging X-Git-Tag: v249-rc1~174^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0c035e3c82a01037874bda1a95f8bac95de6667;p=thirdparty%2Fsystemd.git sleep: remove duplicate logging execute() logs about all errors, hence only log about what's new, i.e. what we'll do as consequence, and don't mention the error cause again. --- diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 86b155c9ea8..8f6bd40c5c7 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -303,11 +303,11 @@ static int execute_s2h(const SleepConfig *sleep_config) { r = execute(sleep_config, SLEEP_HIBERNATE, NULL); if (r < 0) { - log_notice_errno(r, "Couldn't hibernate, will try to suspend again: %m"); + log_notice("Couldn't hibernate, will try to suspend again."); r = execute(sleep_config, SLEEP_SUSPEND, "suspend-after-failed-hibernate"); if (r < 0) - return log_error_errno(r, "Could neither hibernate nor suspend, giving up: %m"); + return r; } return 0;