diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-12-09 15:34:43 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-12-10 06:08:46 +0100 |
commit | 8ad973ed99959ff483f6728bc05d7bbab1db9f7c (patch) | |
tree | 4cb74d12a8ba3bd992e79238db67166209a836d8 /src/sleep | |
parent | Merge pull request #30400 from bluca/coverity (diff) | |
download | systemd-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.c | 4 |
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; } |