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