From abde16c130f30b96100b3cc332143acf7f309c96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 11 Apr 2018 09:27:32 +0200 Subject: [PATCH] shared/sleep-config: rename misnamed function --- src/shared/sleep-config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index 28d19c59b..159003886 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -247,7 +247,7 @@ int find_hibernate_location(char **device, char **type, size_t *size, size_t *us return -ENOSYS; } -static bool enough_memory_for_hibernation(void) { +static bool enough_swap_for_hibernation(void) { _cleanup_free_ char *active = NULL; unsigned long long act = 0; size_t size = 0, used = 0; @@ -430,6 +430,7 @@ int can_sleep(const char *verb) { return true; if (!enough_memory_for_hibernation()) + if (!enough_swap_for_hibernation()) return -ENOSPC; return true; -- 2.30.2