diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-03 17:33:34 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-08 13:03:31 +0200 |
commit | 3b51c3a0b03411b07f0acd8bf2361ba54043fdcf (patch) | |
tree | 7eb708266860a8bbe43391e72bc2c03b29563b23 /lib | |
parent | 19327c1f90e528cd89eb170250ebea6338b424f5 (diff) | |
download | u-boot-3b51c3a0b03411b07f0acd8bf2361ba54043fdcf.zip u-boot-3b51c3a0b03411b07f0acd8bf2361ba54043fdcf.tar.gz u-boot-3b51c3a0b03411b07f0acd8bf2361ba54043fdcf.tar.bz2 |
efi_loader: EFI_VARIABLE_READ_ONLY should be 32bit
GetVariable() and SetVariable() only accept a 32bit value for attributes.
It makes not sense to define EFI_VARIABLE_READ_ONLY as unsigned long.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_variable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 8f55382..b2f8ebd 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -276,8 +276,8 @@ efi_status_t efi_set_variable_int(const u16 *variable_name, /* attributes won't be changed */ if (!delete && ((ro_check && var->attr != attributes) || - (!ro_check && ((var->attr & ~(u32)EFI_VARIABLE_READ_ONLY) - != (attributes & ~(u32)EFI_VARIABLE_READ_ONLY))))) { + (!ro_check && ((var->attr & ~EFI_VARIABLE_READ_ONLY) + != (attributes & ~EFI_VARIABLE_READ_ONLY))))) { return EFI_INVALID_PARAMETER; } time = var->time; |