From 61b76b3a1a296948f3d63a67ac78382569b9f276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 1 Apr 2025 10:49:12 +0200 Subject: [PATCH] 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. --- src/hibernate-resume/hibernate-resume.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c index c6494b99a9..91b98b4f87 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; }