lib/efi: Add EFI_DEFALT_ATTRIBUTES macro
authorGeoff Levand <geoff@infradead.org>
Fri, 10 Aug 2018 17:29:14 +0000 (17:29 +0000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 14 Aug 2018 01:11:57 +0000 (11:11 +1000)
For convenience, add a new efi data attributes macro
EFI_DEFALT_ATTRIBUTES.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/platform-arm64.c
lib/efi/efivar.h

index a70298a1ad8d6ff5c27e34dfd5ac3c2122c8a100..0eb257985855a447e945501dc41aadf0e2d9b675 100644 (file)
@@ -70,10 +70,7 @@ static void write_nvram(const struct param_list *pl)
        struct efi_data efi_data;
        struct param *param;
 
-       efi_data.attributes =
-               EFI_VARIABLE_NON_VOLATILE |
-               EFI_VARIABLE_RUNTIME_ACCESS |
-               EFI_VARIABLE_BOOTSERVICE_ACCESS;
+       efi_data.attributes = EFI_DEFALT_ATTRIBUTES;
 
        param_list_for_each(pl, param) {
                if (!param->modified)
index 0d4410000e6402d61af6163ebfc63d2e29223283..48edd17a2b0231eacd8649a1566453151b55ed59 100644 (file)
 #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS  0x00000020
 #define EFI_VARIABLE_APPEND_WRITE                           0x00000040
 
+#define EFI_DEFALT_ATTRIBUTES ( \
+       EFI_VARIABLE_NON_VOLATILE | \
+       EFI_VARIABLE_RUNTIME_ACCESS | \
+       EFI_VARIABLE_BOOTSERVICE_ACCESS \
+)
+
 #ifndef EFIVARFS_MAGIC
 #define EFIVARFS_MAGIC 0xde5e81e4
 #endif