aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_bootmgr.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-23 12:55:12 -0700
committerTom Rini <trini@konsulko.com>2022-02-03 12:16:01 -0500
commit156ccbc3c4581a1e6d29c51f4af4e120e30a2ef0 (patch)
treedb7dcc9bb8ee0ec5730384d56356ba55a6cfd200 /lib/efi_loader/efi_bootmgr.c
parent587254ebcf05fa76b6a957ffa72db053177836cf (diff)
efi: Use 16-bit unicode strings
At present we use wide characters for unicode but this is not necessary. Change the code to use the 'u' literal instead. This helps to fix build warnings for sandbox on rpi. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r--lib/efi_loader/efi_bootmgr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 1fe19237f9..8c04ecbdc8 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -46,8 +46,8 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
void **load_options)
{
struct efi_load_option lo;
- u16 varname[] = L"Boot0000";
- u16 hexmap[] = L"0123456789ABCDEF";
+ u16 varname[] = u"Boot0000";
+ u16 hexmap[] = u"0123456789ABCDEF";
void *load_option;
efi_uintn_t size;
efi_status_t ret;
@@ -83,7 +83,7 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS;
- ret = efi_set_variable_int(L"BootCurrent",
+ ret = efi_set_variable_int(u"BootCurrent",
&efi_global_variable_guid,
attributes, sizeof(n), &n, false);
if (ret != EFI_SUCCESS)
@@ -149,7 +149,7 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle, void **load_options)
/* BootNext */
size = sizeof(bootnext);
- ret = efi_get_variable_int(L"BootNext",
+ ret = efi_get_variable_int(u"BootNext",
&efi_global_variable_guid,
NULL, &size, &bootnext, NULL);
if (ret == EFI_SUCCESS || ret == EFI_BUFFER_TOO_SMALL) {
@@ -158,7 +158,7 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle, void **load_options)
log_err("BootNext must be 16-bit integer\n");
/* delete BootNext */
- ret = efi_set_variable_int(L"BootNext",
+ ret = efi_set_variable_int(u"BootNext",
&efi_global_variable_guid,
0, 0, NULL, false);
@@ -178,7 +178,7 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle, void **load_options)
}
/* BootOrder */
- bootorder = efi_get_var(L"BootOrder", &efi_global_variable_guid, &size);
+ bootorder = efi_get_var(u"BootOrder", &efi_global_variable_guid, &size);
if (!bootorder) {
log_info("BootOrder not defined\n");
ret = EFI_NOT_FOUND;