]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: slightly tweak error message about not enough swap for hibernation
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Sep 2023 08:41:50 +0000 (10:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Sep 2023 12:47:57 +0000 (14:47 +0200)
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

src/login/logind-dbus.c

index e35005e2624c6eca3cdc310ddfbf75263d0f1ae7..23bf4b8c2067fe2b751ec5df651ba478e5d0efaf 100644 (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",