summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2019-05-24 15:59:02 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-24 18:58:14 +0200
commitdbebae5ec77eee029fb36337643e052eecb50453 (patch)
tree14d4048b5ac2ce781587f6702aa75231c8e9120a /lib/efi_loader
parent609b6ba61d1dfd13d53b3f7172ecc36740009e20 (diff)
efi_loader: variable: return error for APPEND_WRITE
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>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_variable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 28b1aa7505..0d973773fa 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -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;
}