summaryrefslogtreecommitdiff
path: root/cmd/nvedit_efi.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2020-04-14 11:51:47 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-04-16 08:12:47 +0200
commite50e2878b26a2081da7b57edcf0db1cea80b8007 (patch)
tree0bce4357e8b87026a5400753aa00c38508b8f0d2 /cmd/nvedit_efi.c
parentf757d045981779f026ce181404ac4ccc869bc47a (diff)
cmd: env: add "-at" option to "env set -e" command
With "-at" option, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS will be passed to SetVariable() to authenticate the variable. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'cmd/nvedit_efi.c')
-rw-r--r--cmd/nvedit_efi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c
index 579cf43059..837e39e021 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -458,7 +458,7 @@ out:
* Return: CMD_RET_SUCCESS on success, or CMD_RET_RET_FAILURE
*
* This function is for "env set -e" or "setenv -e" command:
- * => env set -e [-guid guid][-nv][-bs][-rt][-a][-v]
+ * => env set -e [-guid guid][-nv][-bs][-rt][-at][-a][-v]
* [-i address,size] var, or
* var [value ...]
* Encode values specified and set given UEFI variable.
@@ -517,6 +517,9 @@ int do_env_set_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
attributes |= EFI_VARIABLE_RUNTIME_ACCESS;
} else if (!strcmp(argv[0], "-nv")) {
attributes |= EFI_VARIABLE_NON_VOLATILE;
+ } else if (!strcmp(argv[0], "-at")) {
+ attributes |=
+ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS;
} else if (!strcmp(argv[0], "-a")) {
attributes |= EFI_VARIABLE_APPEND_WRITE;
} else if (!strcmp(argv[0], "-i")) {