diff options
Diffstat (limited to 'lib/efi_loader/efi_var_file.c')
-rw-r--r-- | lib/efi_loader/efi_var_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index 3d58caa13d..62e071bd83 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -176,7 +176,7 @@ efi_status_t efi_var_restore(struct efi_var_file *buf, bool safe) data = var->name + u16_strlen(var->name) + 1; /* - * Secure boot related and non-volatile variables shall only be + * Secure boot related and volatile variables shall only be * restored from U-Boot's preseed. */ if (!safe && @@ -187,6 +187,8 @@ efi_status_t efi_var_restore(struct efi_var_file *buf, bool safe) continue; if (!var->length) continue; + if (efi_var_mem_find(&var->guid, var->name, NULL)) + continue; ret = efi_var_mem_ins(var->name, &var->guid, var->attr, var->length, data, 0, NULL, var->time); |