mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
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:
parent
887b2019b6
commit
b0c035e3c8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user