From 49483d5cd801f62723a01f09818481114731d4e0ef11752882e5cb4c85a9874b Mon Sep 17 00:00:00 2001 From: Raymund Will Date: Fri, 11 Jul 2014 12:37:40 +0000 Subject: [PATCH] Accepting request 240152 from home:gary_lin:branches:Base:System - delete BootOrder if there is no more boot option. [bnc#883545] OBS-URL: https://build.opensuse.org/request/show/240152 OBS-URL: https://build.opensuse.org/package/show/Base:System/efibootmgr?expand=0&rev=17 --- efibootmgr-0.6.0-check-boot-order.diff | 14 ++++++++++++++ efibootmgr.changes | 6 ++++++ efibootmgr.spec | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 efibootmgr-0.6.0-check-boot-order.diff diff --git a/efibootmgr-0.6.0-check-boot-order.diff b/efibootmgr-0.6.0-check-boot-order.diff new file mode 100644 index 0000000..2a53fe2 --- /dev/null +++ b/efibootmgr-0.6.0-check-boot-order.diff @@ -0,0 +1,14 @@ +diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c +index 7ea1887..b01a05a 100644 +--- a/src/efibootmgr/efibootmgr.c ++++ b/src/efibootmgr/efibootmgr.c +@@ -380,6 +380,9 @@ remove_from_boot_order(uint16_t num) + } + } + ++ if (new_i == 0) ++ return delete_variable(&boot_order); ++ + /* Now new_data has what we need */ + new_data_size = new_i * sizeof(uint16_t); + memset(&(boot_order.Data), 0, boot_order.DataSize); diff --git a/efibootmgr.changes b/efibootmgr.changes index 6362054..8d2261e 100644 --- a/efibootmgr.changes +++ b/efibootmgr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 7 10:45:04 UTC 2014 - glin@suse.com + +- Add efibootmgr-0.6.0-check-boot-order.diff to delete BootOrder + if there is no more boot option. [bnc#883545] + ------------------------------------------------------------------- Thu Dec 19 15:59:44 UTC 2013 - rw@suse.com diff --git a/efibootmgr.spec b/efibootmgr.spec index e27e25f..5ac08a1 100644 --- a/efibootmgr.spec +++ b/efibootmgr.spec @@ -29,6 +29,7 @@ Patch1: %{name}-0.6.0-derhat.diff Patch2: %{name}-0.6.0-set_boot_order.diff Patch3: %{name}-0.6.0-fail-visibly.diff Patch4: %{name}-0.6.0-write-unique-id-once.diff +Patch5: %{name}-0.6.0-check-boot-order.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pciutils-devel @@ -48,6 +49,7 @@ information about the EFI can be found at %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build LOADER="grub.efi" # default loader