daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 4baeb24c8002e602d9eca1ba240aa2e166de4ae6 Mon Sep 17 00:00:00 2001
9fc0f6
From: Jan Janssen <medhefgo@web.de>
9fc0f6
Date: Thu, 31 Oct 2013 17:22:03 +0100
9fc0f6
Subject: [PATCH] Make hibernation test work for swap files
9fc0f6
9fc0f6
Suspend to disk works for swap files too (even if it is located
9fc0f6
on an ecrypted file system):
9fc0f6
https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
9fc0f6
---
9fc0f6
 src/shared/sleep-config.c | 2 +-
9fc0f6
 1 file changed, 1 insertion(+), 1 deletion(-)
9fc0f6
9fc0f6
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
9fc0f6
index d068bfc..2bb0493 100644
9fc0f6
--- a/src/shared/sleep-config.c
9fc0f6
+++ b/src/shared/sleep-config.c
9fc0f6
@@ -206,7 +206,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
9fc0f6
                 if (!d)
9fc0f6
                         return -ENOMEM;
9fc0f6
 
9fc0f6
-                if (!streq(type, "partition")) {
9fc0f6
+                if (!streq(type, "partition") && !streq(type, "file")) {
9fc0f6
                         log_debug("Partition %s has type %s, ignoring.", d, type);
9fc0f6
                         continue;
9fc0f6
                 }