]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/sleep-config: do not ignore resume_offset when resume not set 14511/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Jan 2020 17:16:01 +0000 (18:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 Jan 2020 07:07:14 +0000 (08:07 +0100)
This is most likely a user error, let's make it easier to diagnose.

src/shared/sleep-config.c

index 9ac7b98e966c4c894ac3bcf964951ff207e4a161..e63ef0f261b08752bfbeadf087146224b3415f86 100644 (file)
@@ -271,11 +271,9 @@ static int read_resume_files(dev_t *ret_resume, uint64_t *ret_resume_offset) {
                         return log_error_errno(r, "Failed to parse value in /sys/power/resume_offset \"%s\": %m", resume_offset_str);
         }
 
-        if (resume_offset > 0 && resume == 0) {
-                log_debug("Found offset in /sys/power/resume_offset: %" PRIu64 "; no device id found in /sys/power/resume; ignoring resume_offset",
+        if (resume_offset > 0 && resume == 0)
+                log_debug("Warning: found /sys/power/resume_offset==%" PRIu64 ", but /sys/power/resume unset. Misconfiguration?",
                           resume_offset);
-                resume_offset = 0;
-        }
 
         *ret_resume = resume;
         *ret_resume_offset = resume_offset;