From be0bf69c5bc7db69b7c386e03026e0ad3f3401fa Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang Date: Mon, 20 Feb 2023 11:08:10 +0800 Subject: [PATCH] get_entry: return entry if it was found before reaching the end of the list Signed-off-by: Qiumiao Zhang --- backport-Update-efibootmgr.c.patch | 27 +++++++++++++++++++++++++++ efibootmgr.spec | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 backport-Update-efibootmgr.c.patch diff --git a/backport-Update-efibootmgr.c.patch b/backport-Update-efibootmgr.c.patch new file mode 100644 index 0000000..7226e73 --- /dev/null +++ b/backport-Update-efibootmgr.c.patch @@ -0,0 +1,27 @@ +From 3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e Mon Sep 17 00:00:00 2001 +From: kmicki <1463619+kmicki@users.noreply.github.com> +Date: Tue, 15 Nov 2022 14:37:25 +0100 +Subject: [PATCH] Update efibootmgr.c + +get_entry: return entry if it was found before reaching the end of the list + +Signed-off-by: kmicki <1463619+kmicki@users.noreply.github.com> +--- + src/efibootmgr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index b980bcd..4b15d6d 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1192,6 +1192,7 @@ get_entry(list_t *entries, uint16_t num) + entry = NULL; + continue; + } ++ return entry; + } + + return entry; +-- +2.27.0 + diff --git a/efibootmgr.spec b/efibootmgr.spec index 37bc788..6a2385f 100644 --- a/efibootmgr.spec +++ b/efibootmgr.spec @@ -1,11 +1,12 @@ Name: efibootmgr -Release: 2 +Release: 3 Version: 18 Summary: A tool manipulating the EFI Boot Manager License: GPLv2+ URL: https://github.com/rhboot/%{name}/ Source0: https://github.com/rhboot/%{name}/archive/refs/tags/%{version}.tar.gz +Patch6000: backport-Update-efibootmgr.c.patch BuildRequires: gcc BuildRequires: efi-srpm-macros >= 3-2 efi-filesystem git popt-devel efivar-libs >= 38-1 efivar-devel >= 38-1 @@ -47,6 +48,9 @@ rm -rf %{buildroot} %{_mandir}/*/*.?.gz %changelog +* Mon Feb 20 2023 zhangqiumiao - 18-3 +- get_entry: return entry if it was found before reaching the end of the list + * Fri Nov 25 2022 zhangqiumiao - 18-2 - Fix the wrong url of Source0 and modify the name of the source tarball -- Gitee