From 156ccbc3c4581a1e6d29c51f4af4e120e30a2ef0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 23 Jan 2022 12:55:12 -0700 Subject: 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 Suggested-by: Heinrich Schuchardt Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_setup.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/efi_loader/efi_setup.c') diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 380adc15c8..eee54e4878 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -43,7 +43,7 @@ static efi_status_t efi_init_platform_lang(void) * Variable PlatformLangCodes defines the language codes that the * machine can support. */ - ret = efi_set_variable_int(L"PlatformLangCodes", + ret = efi_set_variable_int(u"PlatformLangCodes", &efi_global_variable_guid, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | @@ -57,7 +57,7 @@ static efi_status_t efi_init_platform_lang(void) * Variable PlatformLang defines the language that the machine has been * configured for. */ - ret = efi_get_variable_int(L"PlatformLang", + ret = efi_get_variable_int(u"PlatformLang", &efi_global_variable_guid, NULL, &data_size, &pos, NULL); if (ret == EFI_BUFFER_TOO_SMALL) { @@ -74,7 +74,7 @@ static efi_status_t efi_init_platform_lang(void) if (pos) *pos = 0; - ret = efi_set_variable_int(L"PlatformLang", + ret = efi_set_variable_int(u"PlatformLang", &efi_global_variable_guid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | @@ -100,7 +100,7 @@ static efi_status_t efi_init_secure_boot(void) }; efi_status_t ret; - ret = efi_set_variable_int(L"SignatureSupport", + ret = efi_set_variable_int(u"SignatureSupport", &efi_global_variable_guid, EFI_VARIABLE_READ_ONLY | EFI_VARIABLE_BOOTSERVICE_ACCESS | @@ -129,12 +129,12 @@ static efi_status_t efi_init_capsule(void) efi_status_t ret = EFI_SUCCESS; if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_UPDATE)) { - ret = efi_set_variable_int(L"CapsuleMax", + ret = efi_set_variable_int(u"CapsuleMax", &efi_guid_capsule_report, EFI_VARIABLE_READ_ONLY | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - 22, L"CapsuleFFFF", false); + 22, u"CapsuleFFFF", false); if (ret != EFI_SUCCESS) printf("EFI: cannot initialize CapsuleMax variable\n"); } @@ -165,7 +165,7 @@ static efi_status_t efi_init_os_indications(void) os_indications_supported |= EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED; - return efi_set_variable_int(L"OsIndicationsSupported", + return efi_set_variable_int(u"OsIndicationsSupported", &efi_global_variable_guid, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | -- cgit v1.2.3