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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-01-07 18:16:01 +01:00
parent 8efc2c1608
commit 8f817cb888
1 changed files with 2 additions and 4 deletions

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