summaryrefslogtreecommitdiffstats
path: root/src/hibernate-resume
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-04-08 22:04:21 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-09 09:40:21 +0200
commit52e555fa27381e6289f83c37078bafa3d0b99eb2 (patch)
treeeb0305bdcf8240edb0bfc2f5191de5228cdb2e13 /src/hibernate-resume
parenttest: Various build environment fixes (diff)
downloadsystemd-52e555fa27381e6289f83c37078bafa3d0b99eb2.tar.xz
systemd-52e555fa27381e6289f83c37078bafa3d0b99eb2.zip
hibernate-resume-config: apply ENABLE_EFI ifdef correctly
Currently, validate_efi_hibernate_location is fully conditioned out if !ENABLE_EFI, but get_efi_hibernate_location() still calls it.
Diffstat (limited to 'src/hibernate-resume')
-rw-r--r--src/hibernate-resume/hibernate-resume-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hibernate-resume/hibernate-resume-config.c b/src/hibernate-resume/hibernate-resume-config.c
index 504d27a396..c7ed1bc8d7 100644
--- a/src/hibernate-resume/hibernate-resume-config.c
+++ b/src/hibernate-resume/hibernate-resume-config.c
@@ -140,7 +140,7 @@ static bool validate_efi_hibernate_location(EFIHibernateLocation *e) {
#endif
int get_efi_hibernate_location(EFIHibernateLocation **ret) {
-
+#if ENABLE_EFI
static const JsonDispatch dispatch_table[] = {
{ "uuid", JSON_VARIANT_STRING, json_dispatch_id128, offsetof(EFIHibernateLocation, uuid), JSON_MANDATORY },
{ "offset", _JSON_VARIANT_TYPE_INVALID, json_dispatch_uint64, offsetof(EFIHibernateLocation, offset), JSON_MANDATORY },
@@ -200,6 +200,7 @@ int get_efi_hibernate_location(EFIHibernateLocation **ret) {
return 1;
skip:
+#endif
if (ret)
*ret = NULL;
return 0;