]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: variable: return error for APPEND_WRITE
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 24 May 2019 06:59:02 +0000 (15:59 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 24 May 2019 16:58:14 +0000 (18:58 +0200)
The current efi_st_variable() doesn't support EFI_VARIABLE_APPEND_WRITE
attiribute for now, and so should return an error.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fix typos is commit message.
Add TODO comment.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_variable.c

index 28b1aa7505ae2d1f31f41380adcae42252f0a18a..0d973773fa1199a8d27d5c0b989ad2738e69c797 100644 (file)
@@ -427,7 +427,9 @@ 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) {
+       /* TODO: implement APPEND_WRITE */
+       if (!variable_name || !vendor ||
+           (attributes & EFI_VARIABLE_APPEND_WRITE)) {
                ret = EFI_INVALID_PARAMETER;
                goto out;
        }