valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0093-Make-hibernation-test-work-for-swap-files.patch

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