projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57ffa99
)
sleep: clear EFI HibernateLocation if writing kernel config fails
author
Mike Yuan
<me@yhndnzj.com>
Sun, 13 Aug 2023 14:59:30 +0000
(22:59 +0800)
committer
Luca Boccassi
<luca.boccassi@gmail.com>
Sun, 13 Aug 2023 21:12:32 +0000
(22:12 +0100)
Follow-up for
f1f331a252d22c15f37d03524cce967664358c5c
src/sleep/sleep.c
patch
|
blob
|
history
diff --git
a/src/sleep/sleep.c
b/src/sleep/sleep.c
index de1f6c7ec1f7893084655f4bd858649e06eb47b3..76b69f817ae7c5830bba3e9a827ff0c968802990 100644
(file)
--- a/
src/sleep/sleep.c
+++ b/
src/sleep/sleep.c
@@
-270,8
+270,12
@@
static int execute(
return r;
r = write_kernel_hibernate_location(hibernate_location);
- if (r < 0)
+ if (r < 0) {
+ if (is_efi_boot())
+ (void) efi_set_variable(EFI_SYSTEMD_VARIABLE(HibernateLocation), NULL, 0);
+
return log_error_errno(r, "Failed to prepare for hibernation: %m");
+ }
}
r = write_mode(modes);