mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
efi_loader: all variable attributes are 32bit
GetVariable() and SetVariable() use an uint32_t value for attributes. The UEFI specification defines the related constants as 32bit. Add the missing EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS constant. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
584a2ada6e
commit
19327c1f90
3 changed files with 11 additions and 10 deletions
|
@ -259,7 +259,7 @@ efi_status_t efi_set_variable_int(const u16 *variable_name,
|
|||
/* check if a variable exists */
|
||||
var = efi_var_mem_find(vendor, variable_name, NULL);
|
||||
append = !!(attributes & EFI_VARIABLE_APPEND_WRITE);
|
||||
attributes &= ~(u32)EFI_VARIABLE_APPEND_WRITE;
|
||||
attributes &= ~EFI_VARIABLE_APPEND_WRITE;
|
||||
delete = !append && (!data_size || !attributes);
|
||||
|
||||
/* check attributes */
|
||||
|
@ -398,7 +398,7 @@ efi_status_t efi_query_variable_info_int(u32 attributes,
|
|||
EFI_VARIABLE_RUNTIME_ACCESS)
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
||||
if (attributes & ~(u32)EFI_VARIABLE_MASK)
|
||||
if (attributes & ~EFI_VARIABLE_MASK)
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
||||
*maximum_variable_storage_size = EFI_VAR_BUF_SIZE -
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue