]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hibernate-util: return 1 for hibernation_is_safe only when all checks pass
authorMike Yuan <me@yhndnzj.com>
Sat, 25 Nov 2023 07:07:17 +0000 (15:07 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 5 Dec 2023 08:52:19 +0000 (16:52 +0800)
The return value is currently not used, but let's correct this.

src/shared/hibernate-util.c

index 3eb13d48f68897b66a0aa64b5e000239aace5c41..2ce3781cbf6892a76a3f44efb1bd133bf69281c3 100644 (file)
@@ -446,7 +446,7 @@ int hibernation_is_safe(void) {
                                        "Not running on EFI and resume= is not set. Hibernation is not safe.");
 
         if (bypass_space_check)
-                return true;
+                return 0;
 
         r = get_proc_meminfo_active(&active);
         if (r < 0)