summaryrefslogtreecommitdiff
path: root/src/shared/sleep-config.h
diff options
context:
space:
mode:
authorZach Smith <z@zxmth.us>2019-12-06 16:37:22 -0800
committerZach Smith <z@zxmth.us>2020-01-05 20:15:38 -0800
commit52133271a7b3d76bed6d957f75371030193f5282 (patch)
treedb9af7ffac021282156166fbd8f7f457e03c05fe /src/shared/sleep-config.h
parent65ca546f0697f7a17bd435abd0d77bec26dbf28e (diff)
downloadsystemd-52133271a7b3d76bed6d957f75371030193f5282.tar.gz
systemd-sleep: always attempt hibernation if configured
When calculation of swap file offset is unsupported, rely on the /sys/power/resume & /sys/power/resume_offset values if configured rather than requiring a matching swap entry to be identified. Refactor to use dev_t for comparison of resume= device instead of string.
Diffstat (limited to 'src/shared/sleep-config.h')
-rw-r--r--src/shared/sleep-config.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 3d82ee8e6c..faa3c0519a 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -40,8 +40,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(SwapEntry*, swap_entry_free);
* and the matching /proc/swap entry.
*/
typedef struct HibernateLocation {
- char *resume;
- uint64_t resume_offset;
+ dev_t devno;
+ uint64_t offset;
SwapEntry *swap;
} HibernateLocation;