Fix initialization in efidisk patch

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-03-09 16:50:45 +00:00
parent 95d197a80c
commit 9a30e00fc0
5 changed files with 15 additions and 5 deletions

View File

@ -1,7 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
Date: Tue, 8 Feb 2022 08:39:10 +0100
Subject: [PATCH] search: fixed bug stopping iteration when --no-floppy is used
Subject: [PATCH] commands/search: Fix bug stopping iteration when --no-floppy
is used
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -10,6 +11,9 @@ When using --no-floppy and a floppy was encountered, iterate_device()
was returning 1, causing the iteration to stop instead of continuing.
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
(cherry picked from commit 68ba54c2298604146be83cae144dafd1cfd1fe2d)
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/commands/search.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

View File

@ -17,6 +17,8 @@ effective EFI device behind.
This commit also refactors handling of --no-floppy option.
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
[rharwood: apply rmetrich's flags initialization fix]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/commands/search.c | 27 +++++++++++++++++++++++----
grub-core/commands/search_wrap.c | 18 ++++++++++++------
@ -24,7 +26,7 @@ Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
3 files changed, 47 insertions(+), 13 deletions(-)
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
index 51656e361cc..57d26ced8a8 100644
index 51656e361cc..dc182bf2017 100644
--- a/grub-core/commands/search.c
+++ b/grub-core/commands/search.c
@@ -47,7 +47,7 @@ struct search_ctx
@ -32,7 +34,7 @@ index 51656e361cc..57d26ced8a8 100644
const char *key;
const char *var;
- int no_floppy;
+ enum search_flags flags;
+ enum search_flags flags = 0;
char **hints;
unsigned nhints;
int count;

View File

@ -50,6 +50,7 @@ The code is easily extensible to handle other arguments in the future if
needed.
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/Makefile.core.def | 6 ++
grub-core/commands/efi/connectefi.c | 205 ++++++++++++++++++++++++++++++++++++

View File

@ -207,6 +207,6 @@ Patch0206: 0206-Where-present-ensure-config-util.h-precedes-config.h.patch
Patch0207: 0207-Drop-gnulib-fix-base64.patch.patch
Patch0208: 0208-Drop-gnulib-no-abort.patch.patch
Patch0209: 0209-Update-gnulib-version-and-drop-most-gnulib-patches.patch
Patch0210: 0210-search-fixed-bug-stopping-iteration-when-no-floppy-i.patch
Patch0210: 0210-commands-search-Fix-bug-stopping-iteration-when-no-f.patch
Patch0211: 0211-search-new-efidisk-only-option-on-EFI-systems.patch
Patch0212: 0212-efi-new-connectefi-command.patch

View File

@ -17,7 +17,7 @@
Name: grub2
Epoch: 1
Version: 2.06
Release: 20%{?dist}
Release: 21%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+
URL: http://www.gnu.org/software/grub/
@ -526,6 +526,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif
%changelog
* Wed Mar 09 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-21
- Fix initialization in efidisk patch
* Mon Feb 28 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-20
- Disable the .package_note awfulness
- Resolves: #2058712