aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenaud Métrich <rmetrich@redhat.com>2022-02-08 08:39:10 +0100
committerDaniel Kiper <daniel.kiper@oracle.com>2022-03-07 14:21:06 +0100
commit68ba54c2298604146be83cae144dafd1cfd1fe2d (patch)
treef1e54ba984449752f5a278c5b8120cfc072c7415
parentbe257de00c8edbbe8e26d83769c6d36ea1f2a734 (diff)
downloadgrub-68ba54c2298604146be83cae144dafd1cfd1fe2d.tar.gz
commands/search: Fix bug stopping iteration when --no-floppy is used
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>
-rw-r--r--grub-core/commands/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
index ed090b3af..51656e361 100644
--- a/grub-core/commands/search.c
+++ b/grub-core/commands/search.c
@@ -64,7 +64,7 @@ iterate_device (const char *name, void *data)
/* Skip floppy drives when requested. */
if (ctx->no_floppy &&
name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
- return 1;
+ return 0;
#ifdef DO_SEARCH_FS_UUID
#define compare_fn grub_strcasecmp