summaryrefslogtreecommitdiffstats
path: root/src/sleep
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-12-09 15:34:43 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-12-10 06:08:46 +0100
commit8ad973ed99959ff483f6728bc05d7bbab1db9f7c (patch)
tree4cb74d12a8ba3bd992e79238db67166209a836d8 /src/sleep
parentMerge pull request #30400 from bluca/coverity (diff)
downloadsystemd-8ad973ed99959ff483f6728bc05d7bbab1db9f7c.tar.xz
systemd-8ad973ed99959ff483f6728bc05d7bbab1db9f7c.zip
hibernate-util: de-duplicate clear_efi_hibernate_location
Diffstat (limited to 'src/sleep')
-rw-r--r--src/sleep/sleep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 6ff012d447..3784796487 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -301,8 +301,8 @@ static int execute(
return 0;
fail:
- if (sleep_operation_is_hibernation(operation) && is_efi_boot())
- (void) efi_set_variable(EFI_SYSTEMD_VARIABLE(HibernateLocation), NULL, 0);
+ if (sleep_operation_is_hibernation(operation))
+ clear_efi_hibernate_location_and_warn();
return r;
}