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.
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;