Blame SOURCES/0492-search-fixed-bug-stopping-iteration-when-no-floppy-i.patch

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