common: Drop uuid.h from common header
[oweals/u-boot.git] / cmd / nvedit_efi.c
index 579cf430593c21bd60677e5fc10c415178212a3f..75e4e51495353371a2c80994d41ac5cddb1965e9 100644 (file)
@@ -14,6 +14,7 @@
 #include <hexdump.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <uuid.h>
 #include <linux/kernel.h>
 
 /*
@@ -298,7 +299,7 @@ int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                                return CMD_RET_USAGE;
 
                        /* -a already specified */
-                       if (!default_guid & guid_any)
+                       if (!default_guid && guid_any)
                                return CMD_RET_USAGE;
 
                        argc--;
@@ -458,7 +459,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 +518,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")) {