Commit d8b09ffe authored by Jon Severinsson's avatar Jon Severinsson Committed by Martin Pitt
Browse files

Add support for TuxOnIce hibernation.

Closes: #746463
parent c440fa00
......@@ -18,6 +18,7 @@ systemd (208-7) UNRELEASED; urgency=medium
sysv-compatible symlinks become dangling on a partial install.
* Ensure that systemctl is usable right after being unpacked, by adding the
required Pre-Depends to systemd and libsystemd-daemon0. (Closes: #753589)
* Add support for TuxOnIce hibernation. (Closes: #746463)
[ Martin Pitt ]
* Rename "api" autopkgtest to "build-login", and stop requiring that
......
From: Julien Muchembled <jm@jmuchemb.eu>
Date: Tue, 29 Apr 2014 11:40:50 +0200
Subject: Add support for TuxOnIce hibernation
systemd does not support non-mainline kernel features so upstream rejected this
patch.
It is however required for systemd integration by tuxonice-userui package.
Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960.html
---
src/shared/sleep-config.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 70a0896..bd81f49 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -224,6 +224,12 @@ static bool enough_memory_for_hibernation(void) {
size_t size, used;
int r;
+ /* TuxOnIce is an alternate implementation for hibernation.
+ * It can be configured to compress the image to a file or an inactive
+ * swap partition, so there's nothing more we can do here. */
+ if (access("/sys/power/tuxonice", F_OK) == 0)
+ return true;
+
r = hibernation_partition_size(&size, &used);
if (r < 0)
return false;
......@@ -526,3 +526,4 @@ Add-run-initctl-support-to-SysV-compat-tools.patch
core-transaction-fix-cycle-break-attempts-outside-tr.patch
tmpfiles-don-t-allow-read-access-to-journal-files-to.patch
Map-rcS.d-init-script-dependencies-to-their-systemd-.patch
Add-support-for-TuxOnIce-hibernation.patch
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment