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

AKASHI Takahiro takahiro.akashi at linaro.org
Fri May 24 06:59:02 UTC 2019


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>
---
 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;
 	}
-- 
2.21.0



More information about the U-Boot mailing list