Blame SOURCES/0492-commands-search-Fix-bug-stopping-iteration-when-no-f.patch

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