mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
efi_loader: adjust definitions of variable services
The definitons of the variable services are adjusted: - use efi_uintn_t instead of unsigned long - use u16 * instead of s16 * for Unicode strings - correct definition of QueryVariableInfo - rename efi_get_next_variable to efi_get_next_variable_name Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
e37aa7ada3
commit
45c66f9cdf
5 changed files with 43 additions and 43 deletions
|
@ -113,8 +113,8 @@ static char *mem2hex(char *hexstr, const u8 *mem, int count)
|
|||
return hexstr;
|
||||
}
|
||||
|
||||
static efi_status_t efi_to_native(char *native, s16 *variable_name,
|
||||
efi_guid_t *vendor)
|
||||
static efi_status_t efi_to_native(char *native, u16 *variable_name,
|
||||
efi_guid_t *vendor)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
|
@ -176,9 +176,9 @@ static const char *parse_attr(const char *str, u32 *attrp)
|
|||
}
|
||||
|
||||
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetVariable.28.29 */
|
||||
efi_status_t EFIAPI efi_get_variable(s16 *variable_name,
|
||||
efi_guid_t *vendor, u32 *attributes,
|
||||
unsigned long *data_size, void *data)
|
||||
efi_status_t EFIAPI efi_get_variable(u16 *variable_name, efi_guid_t *vendor,
|
||||
u32 *attributes, efi_uintn_t *data_size,
|
||||
void *data)
|
||||
{
|
||||
char native_name[MAX_NATIVE_VAR_NAME + 1];
|
||||
efi_status_t ret;
|
||||
|
@ -250,9 +250,9 @@ efi_status_t EFIAPI efi_get_variable(s16 *variable_name,
|
|||
}
|
||||
|
||||
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetNextVariableName.28.29 */
|
||||
efi_status_t EFIAPI efi_get_next_variable(
|
||||
unsigned long *variable_name_size,
|
||||
s16 *variable_name, efi_guid_t *vendor)
|
||||
efi_status_t EFIAPI efi_get_next_variable_name(efi_uintn_t *variable_name_size,
|
||||
u16 *variable_name,
|
||||
efi_guid_t *vendor)
|
||||
{
|
||||
EFI_ENTRY("%p \"%ls\" %pUl", variable_name_size, variable_name, vendor);
|
||||
|
||||
|
@ -260,16 +260,16 @@ efi_status_t EFIAPI efi_get_next_variable(
|
|||
}
|
||||
|
||||
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#SetVariable.28.29 */
|
||||
efi_status_t EFIAPI efi_set_variable(s16 *variable_name,
|
||||
efi_guid_t *vendor, u32 attributes,
|
||||
unsigned long data_size, void *data)
|
||||
efi_status_t EFIAPI efi_set_variable(u16 *variable_name, efi_guid_t *vendor,
|
||||
u32 attributes, efi_uintn_t data_size,
|
||||
void *data)
|
||||
{
|
||||
char native_name[MAX_NATIVE_VAR_NAME + 1];
|
||||
efi_status_t ret = EFI_SUCCESS;
|
||||
char *val, *s;
|
||||
u32 attr;
|
||||
|
||||
EFI_ENTRY("\"%ls\" %pUl %x %lu %p", variable_name, vendor, attributes,
|
||||
EFI_ENTRY("\"%ls\" %pUl %x %zu %p", variable_name, vendor, attributes,
|
||||
data_size, data);
|
||||
|
||||
if (!variable_name || !vendor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue