summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_var_mem.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-02-20 11:21:41 -0600
committerTom Rini <trini@konsulko.com>2025-02-20 11:21:41 -0600
commit313b9856f95419b01df7cc6b9a16f7b07d9fe13c (patch)
treee7dbb656e3fc05ad4a7fa7a67c89ba0945cfcfc3 /lib/efi_loader/efi_var_mem.c
parent7a6dbb9dbe2ed4f6e51b3902fc7aa5a425f5f203 (diff)
parent5ce629db2512d70f298bc1d422fefad63a74c7f5 (diff)
Merge tag 'efi-2025-04-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/24709 UEFI: * create a parent device for all EFI block devices * move lmb_map_update_notify() to EFI * make efi_add_memory_map_pg() static * remove comparisons to string literals from runtime * ix potential deref-after-null Other: * avoid superfluous value check in lmb_map_update_notify() * support more efi protocols in uuid_guid_get_str()
Diffstat (limited to 'lib/efi_loader/efi_var_mem.c')
-rw-r--r--lib/efi_loader/efi_var_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c
index b265d95dd6b..31180df9e3a 100644
--- a/lib/efi_loader/efi_var_mem.c
+++ b/lib/efi_loader/efi_var_mem.c
@@ -19,6 +19,7 @@
*/
static struct efi_var_file __efi_runtime_data *efi_var_buf;
static struct efi_var_entry __efi_runtime_data *efi_current_var;
+static const u16 __efi_runtime_rodata vtf[] = u"VarToFile";
/**
* efi_var_mem_compare() - compare GUID and name with a variable
@@ -331,7 +332,7 @@ efi_get_variable_mem(const u16 *variable_name, const efi_guid_t *vendor,
if (timep)
*timep = var->time;
- if (!u16_strcmp(variable_name, u"VarToFile"))
+ if (!u16_strcmp(variable_name, vtf))
return efi_var_collect_mem(data, data_size, EFI_VARIABLE_NON_VOLATILE);
old_size = *data_size;