From: Mike Yuan Date: Mon, 8 Apr 2024 20:04:21 +0000 (+0800) Subject: hibernate-resume-config: apply ENABLE_EFI ifdef correctly X-Git-Tag: v256-rc1~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52e555fa27381e6289f83c37078bafa3d0b99eb2;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/hibernate-resume/hibernate-resume-config.c b/src/hibernate-resume/hibernate-resume-config.c index 504d27a3963..c7ed1bc8d73 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;