|
|
f6e916 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
f6e916 |
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
|
|
|
f6e916 |
Date: Tue, 8 Feb 2022 08:39:10 +0100
|
|
|
f6e916 |
Subject: [PATCH] commands/search: Fix bug stopping iteration when --no-floppy
|
|
|
f6e916 |
is used
|
|
|
f6e916 |
MIME-Version: 1.0
|
|
|
f6e916 |
Content-Type: text/plain; charset=UTF-8
|
|
|
f6e916 |
Content-Transfer-Encoding: 8bit
|
|
|
f6e916 |
|
|
|
f6e916 |
When using --no-floppy and a floppy was encountered, iterate_device()
|
|
|
f6e916 |
was returning 1, causing the iteration to stop instead of continuing.
|
|
|
f6e916 |
|
|
|
f6e916 |
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
|
|
|
f6e916 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
f6e916 |
(cherry picked from commit 68ba54c2298604146be83cae144dafd1cfd1fe2d)
|
|
|
f6e916 |
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
|
|
f6e916 |
(cherry picked from commit 7ada55e3fcd16e00773d3918955b2b945b7f063a)
|
|
|
f6e916 |
(cherry picked from commit 44a58e304fd06155a56b650927728af01bbc647d)
|
|
|
f6e916 |
---
|
|
|
f6e916 |
grub-core/commands/search.c | 2 +-
|
|
|
f6e916 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
f6e916 |
|
|
|
f6e916 |
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
|
|
|
f6e916 |
index ddda6e7c5..d3180bf66 100644
|
|
|
f6e916 |
--- a/grub-core/commands/search.c
|
|
|
f6e916 |
+++ b/grub-core/commands/search.c
|
|
|
f6e916 |
@@ -64,7 +64,7 @@ iterate_device (const char *name, void *data)
|
|
|
f6e916 |
/* Skip floppy drives when requested. */
|
|
|
f6e916 |
if (ctx->no_floppy &&
|
|
|
f6e916 |
name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
|
|
|
f6e916 |
- return 1;
|
|
|
f6e916 |
+ return 0;
|
|
|
f6e916 |
|
|
|
f6e916 |
#ifdef DO_SEARCH_FS_UUID
|
|
|
f6e916 |
#define compare_fn grub_strcasecmp
|