From: Zbigniew Jędrzejewski-Szmek Date: Tue, 1 Apr 2025 08:49:12 +0000 (+0200) Subject: hibernate-resume: restore full message if resume fails X-Git-Tag: v258-rc1~961^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61b76b3a1a296948f3d63a67ac78382569b9f276;p=thirdparty%2Fsystemd.git hibernate-resume: restore full message if resume fails We had a INFO message before 760e99bb52dd132aeab14802c9ed2889471e9cdf. Logging at INFO level made sense back when we didn't have the EFI variable and people would set resume= on the kernel command line. Nowadays, if we have the hibernation info, then we expect it to be accurate. Log at WARN level if we have the EFI variable and the resume fails for any reason, and at INFO otherwise. OTOH, we already print errors immediately when that happens, and if the resume failed in the kernel, the kernel should log on its own. So just use WARN, not ERR. --- diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c index c6494b99a91..91b98b4f877 100644 --- a/src/hibernate-resume/hibernate-resume.c +++ b/src/hibernate-resume/hibernate-resume.c @@ -172,11 +172,10 @@ static int run(int argc, char *argv[]) { /* The write shall not return if a resume takes place. */ r = write_resume_config(st.st_rdev, arg_info.offset, arg_info.device); - log_full_errno(r < 0 ? LOG_ERR : LOG_DEBUG, + log_full_errno(r < 0 || arg_info.efi ? LOG_WARNING : LOG_INFO, r < 0 ? r : SYNTHETIC_ERRNO(ENOENT), "Unable to resume from device '%s' (" DEVNUM_FORMAT_STR ") offset %" PRIu64 ", continuing boot process.", arg_info.device, DEVNUM_FORMAT_VAL(st.st_rdev), arg_info.offset); - return r; }