From 5a43dce1ef31d3d4927a4c67400a7e33ff8afe75 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 22 Aug 2014 12:23:28 -0400
Subject: [PATCH] Revert "Only open with O_CREAT if we're not using
EFI_VARIABLE_APPEND_WRITE."
This reverts commit 7153d0dbb7d1d36b1712dfa91e2e62043880fdfa.
---
src/efivarfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/efivarfs.c b/src/efivarfs.c
index b918c67..9b77d4e 100644
--- a/src/efivarfs.c
+++ b/src/efivarfs.c
@@ -209,10 +209,7 @@ efivarfs_set_variable(efi_guid_t guid, const char *name, uint8_t *data,
goto err;
}
- int flags = O_WRONLY;
- if (!(attributes & EFI_VARIABLE_APPEND_WRITE))
- flags |= O_CREAT|O_EXCL;
- fd = open(path, flags, 0600);
+ fd = open(path, O_WRONLY|O_CREAT, 0600);
if (fd < 0)
goto err;
--
1.9.3