[U-Boot] [PATCH v2 2/3] efi_loader: variable: return error for APPEND_WRITE

Heinrich Schuchardt xypron.glpk at gmx.de
Fri May 24 14:45:14 UTC 2019


On 5/24/19 8:59 AM, AKASHI Takahiro wrote:
> The current efi_et_variable() doesn't support EFI_VARIABLE_APPEND_WRITE
> attiribut for now, and so should return an error.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>

I will correct the typos in the commit message and add a TODO comment in
the code.

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

> ---
>  lib/efi_loader/efi_variable.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
> index 28b1aa7505ae..e3ec502ffb45 100644
> --- a/lib/efi_loader/efi_variable.c
> +++ b/lib/efi_loader/efi_variable.c
> @@ -427,7 +427,8 @@ efi_status_t EFIAPI efi_set_variable(u16 *variable_name,
>  	EFI_ENTRY("\"%ls\" %pUl %x %zu %p", variable_name, vendor, attributes,
>  		  data_size, data);
>
> -	if (!variable_name || !vendor) {
> +	if (!variable_name || !vendor ||
> +	    (attributes & EFI_VARIABLE_APPEND_WRITE)) {
>  		ret = EFI_INVALID_PARAMETER;
>  		goto out;
>  	}
>



More information about the U-Boot mailing list