logind: slightly tweak error message about not enough swap for hibernation

Let's tweak the message if not enough swap is around slightly: systems
might have plenty swap backed by incompatible storage (specifically:
swap files on btrfs), but we (currently) do not support hibernating to
that.

Hence let's say *suitable* swap space and talk about *compatibility* of
backing storage.

Hopefully this will make things a bit clearer to users.

Prompted by: #29189
This commit is contained in:
Lennart Poettering
2023-09-18 14:47:57 +02:00
parent 0959847af5
commit 43cb0f3e46
+1 -1
View File
@@ -1926,7 +1926,7 @@ static int method_do_shutdown_or_sleep(
r = can_sleep(a->sleep_operation);
if (r == -ENOSPC)
return sd_bus_error_set(error, BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED,
"Not enough swap space for hibernation");
"Not enough suitable swap space for hibernation available on compatible block devices and file systems");
if (r == 0)
return sd_bus_error_setf(error, BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED,
"Sleep verb \"%s\" not supported",