@@ -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)
@@ -30,6 +30,12 @@
#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
For convenience, add a new efi data attributes macro EFI_DEFALT_ATTRIBUTES. Signed-off-by: Geoff Levand <geoff@infradead.org> --- discover/platform-arm64.c | 5 +---- lib/efi/efivar.h | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-)