From b46987f374d6ea2235860e9fdd2e2369efdaf822 Mon Sep 17 00:00:00 2001 From: "Nicholas S. Castellano" Date: Sun, 10 Dec 2023 12:58:03 -0500 Subject: [PATCH] Bug fix, efibootmgr cannot set boot entries active/inactive Patch to address a bug in the current version of efibootmgr, described at https://github.com/rhboot/efibootmgr/issues/186 --- ...rn-entry-if-found-before-end-of-list.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 board/batocera/patches/efibootmgr/001-return-entry-if-found-before-end-of-list.patch diff --git a/board/batocera/patches/efibootmgr/001-return-entry-if-found-before-end-of-list.patch b/board/batocera/patches/efibootmgr/001-return-entry-if-found-before-end-of-list.patch new file mode 100644 index 00000000000..8f8678b961e --- /dev/null +++ b/board/batocera/patches/efibootmgr/001-return-entry-if-found-before-end-of-list.patch @@ -0,0 +1,23 @@ +# https://github.com/rhboot/efibootmgr/issues/186 +commit 3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e +Author: kmicki <1463619+kmicki@users.noreply.github.com> +Date: Tue Nov 15 14:37:25 2022 +0100 + + 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> + +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;