diff options
author | Heinrich Schuchardt | 2020-11-02 19:32:24 +0100 |
---|---|---|
committer | Heinrich Schuchardt | 2020-11-09 17:28:17 +0100 |
commit | ab02c3fec499e89e09b0f024ef263821e4b5d918 (patch) | |
tree | 171a821e9cbeee082fa058e2cde5ae3750a08fd0 /lib/efi_loader | |
parent | b055a05b989cb67484d2cef62b784896914ceb58 (diff) |
efi_loader: non-volatile variable not deleted from file
When deleting a non-volatile variable it was deleted from memory but the
deletion was not persisted to the file system.
SetVariable() may be called with attributes == 0 to delete a variable. To
determine if the deletion shall be persisted we have to consider the
non-volatile flag in the attributes of the deleted variable and not the
value passed in the call parameter.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/efi_variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index a10b9caa8b0..0c689cfb470 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -393,6 +393,7 @@ efi_status_t efi_set_variable_int(u16 *variable_name, const efi_guid_t *vendor, if (delete) { /* EFI_NOT_FOUND has been handled before */ + attributes = var->attr; ret = EFI_SUCCESS; } else if (append) { u16 *old_data = var->name; |