Blame SOURCES/0022-Make-sure-BootOrder-gets-shortened-while-deleting.patch
|
|
38ab4d |
From 2c20a1e3e209970c35322b4f282a717974de051a Mon Sep 17 00:00:00 2001
|
|
|
5fb29d |
From: Peter Jones <pjones@redhat.com>
|
|
|
5fb29d |
Date: Mon, 2 Feb 2015 11:13:20 -0500
|
|
|
38ab4d |
Subject: [PATCH 22/31] Make sure BootOrder gets shortened while deleting.
|
|
|
5fb29d |
|
|
|
5fb29d |
So, what has happened is that a chunk of the patch for 1168019 got
|
|
|
5fb29d |
dropped in a merge conflict error, and as a result the variable is never
|
|
|
5fb29d |
actually shortened, and some of the old data is set as a result.
|
|
|
5fb29d |
|
|
|
5fb29d |
Resolves: rhbz#1188313
|
|
|
5fb29d |
|
|
|
5fb29d |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
5fb29d |
---
|
|
|
5fb29d |
src/efibootmgr/efibootmgr.c | 5 +++++
|
|
|
5fb29d |
1 file changed, 5 insertions(+)
|
|
|
5fb29d |
|
|
|
5fb29d |
diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
|
|
|
5fb29d |
index 1b55125..b5d4147 100644
|
|
|
5fb29d |
--- a/src/efibootmgr/efibootmgr.c
|
|
|
5fb29d |
+++ b/src/efibootmgr/efibootmgr.c
|
|
|
5fb29d |
@@ -462,6 +462,11 @@ remove_from_boot_order(uint16_t num)
|
|
|
5fb29d |
|
|
|
5fb29d |
/* BootOrder variable needs to be updated */
|
|
|
5fb29d |
efi_del_variable(EFI_GLOBAL_GUID, "BootOrder");
|
|
|
5fb29d |
+
|
|
|
5fb29d |
+ if (new_i == 0)
|
|
|
5fb29d |
+ goto all_done;
|
|
|
5fb29d |
+
|
|
|
5fb29d |
+ boot_order->data_size = sizeof(data[0]) * new_i;
|
|
|
5fb29d |
rc = efi_set_variable(EFI_GLOBAL_GUID, "BootOrder", boot_order->data,
|
|
|
5fb29d |
boot_order->data_size, boot_order->attributes);
|
|
|
5fb29d |
all_done:
|
|
|
5fb29d |
--
|
|
|
38ab4d |
2.7.4
|
|
|
5fb29d |
|