From: Zbigniew Jędrzejewski-Szmek Date: Tue, 7 Jan 2020 17:16:01 +0000 (+0100) Subject: shared/sleep-config: do not ignore resume_offset when resume not set X-Git-Tag: v245-rc1~167^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14511%2Fhead;p=thirdparty%2Fsystemd.git shared/sleep-config: do not ignore resume_offset when resume not set This is most likely a user error, let's make it easier to diagnose. --- diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index 9ac7b98e966..e63ef0f261b 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -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;