efivar/0064-Fix-efivar-w-and-efivar-a.patch
Petr Šabata 974b936917 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/efivar#9f54d8029387895b7b1389d9a9f9e0bf476a027f
2020-10-14 23:58:29 +02:00

38 lines
1.1 KiB
Diff

From fa29161221937243dd7c3a11908aa020aa5e990c Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 13 Jan 2020 16:40:32 -0500
Subject: [PATCH 64/86] Fix "efivar -w" and "efivar -a"
When adding --export, I broke -w and -a by accidentally using the wrong
variable to get the data from. Woops.
Resolves github issue #143
Signed-off-by: Peter Jones <pjones@redhat.com>
---
src/efivar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/efivar.c b/src/efivar.c
index 8b1da8888f6..edfd4af7e01 100644
--- a/src/efivar.c
+++ b/src/efivar.c
@@ -614,12 +614,12 @@ int main(int argc, char *argv[])
show_variable(guid_name, SHOW_DECIMAL);
break;
case ACTION_APPEND | ACTION_PRINT:
- prepare_data(infile, &data, &data_size);
+ prepare_data(datafile, &data, &data_size);
edit_variable(guid_name, data, data_size, attributes,
EDIT_APPEND);
break;
case ACTION_WRITE | ACTION_PRINT:
- prepare_data(infile, &data, &data_size);
+ prepare_data(datafile, &data, &data_size);
edit_variable(guid_name, data, data_size, attributes,
EDIT_WRITE);
break;
--
2.24.1