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.
This commit is contained in:
Lennart Poettering
2021-05-22 11:00:04 +02:00
parent 887b2019b6
commit b0c035e3c8
+2 -2
View File
@@ -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;