[systemd-devel] [PATCH] Add support for TuxOnIce hibernation

Julien Muchembled jm at jmuchemb.eu
Tue Apr 29 04:16:59 PDT 2014


Homepage: http://tuxonice.net/
---
 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 cf1cd40..d1f7fb1 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 = 0, used = 0;
         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;
-- 
1.8.5.2.988.g9b015e5.dirty



More information about the systemd-devel mailing list