summaryrefslogtreecommitdiff
path: root/src/shared/sleep-config.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2018-03-08 02:41:50 -0600
committerMario Limonciello <mario.limonciello@dell.com>2018-04-09 13:17:56 -0500
commit17c40b3a8fbfb797110c88d749bd5d37e6ee6e3c (patch)
tree70376ccc4a6c11a49c52fb0944001434f05f9a9f /src/shared/sleep-config.h
parentc75436067f4b392ecf161e123279720dc5c3b33a (diff)
downloadsystemd-17c40b3a8fbfb797110c88d749bd5d37e6ee6e3c.tar.gz
sleep: Add support for setting a disk offset when hibernating
The Linux kernel is adding support for configuring the offset into a disk. This allows swapfiles to be more usable as users will no longer need to set the offset on their kernel command line. Use this API in systemd when hibernating as well. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Diffstat (limited to 'src/shared/sleep-config.h')
-rw-r--r--src/shared/sleep-config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 3dacda0d80..b91a4b2d26 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -20,9 +20,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <linux/fiemap.h>
#include "time-util.h"
+int read_fiemap(int fd, struct fiemap **ret);
int parse_sleep_config(const char *verb, char ***modes, char ***states, usec_t *delay);
+int find_hibernate_location(char **device, char **type, size_t *size, size_t *used);
int can_sleep(const char *verb);
int can_sleep_disk(char **types);