systemd-sleep: always prefer resume device or file
authorZach Smith <z@zxmth.us>
Fri, 27 Sep 2019 04:02:28 +0000 (21:02 -0700)
committerZach Smith <z@zxmth.us>
Thu, 24 Oct 2019 14:38:24 +0000 (07:38 -0700)
commit7bdf56a28ae5ba3c2ae404932062dbf240ddc511
tree475e403b4e4caf2b1c04fa375c30acdf986029cb
parent10b843efb006da57c47cb07d48a2b21dbdfba8eb
systemd-sleep: always prefer resume device or file

This change checks each swap partition or file reported in /proc/swaps
to see if it matches the values configured with resume= and
resume_offset= kernel parameters. If a match is found, the matching swap
entry is used as the hibernation location regardless of swap priority.
src/shared/sleep-config.c
src/shared/sleep-config.h
src/sleep/sleep.c