mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
587254ebcf
commit
156ccbc3c4
34 changed files with 267 additions and 267 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue