From 1b782e902e69516f82158203674d4951a40c82d4 Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <arvidjaar@gmail.com>
Date: Tue, 23 Feb 2016 23:14:41 +0300
Subject: [PATCH] search: actually skip floppy with --no-floppy

grub_device_iterate() ignores device when iterator returns 1, not 0.

Reported by Carlos E. R. <robin.listas@telefonica.net>
---
 grub-core/commands/search.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
index 440303a4e..7dd32e445 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 0;
+    return 1;
 
 #ifdef DO_SEARCH_FS_UUID
 #define compare_fn grub_strcasecmp
-- 
GitLab