]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
search: actually skip floppy with --no-floppy
authorAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 23 Feb 2016 20:14:41 +0000 (23:14 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 23 Feb 2016 20:17:24 +0000 (23:17 +0300)
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

index 440303a4edc55ed4ec9dee7d4f4fa1fff9abfd9b..7dd32e445c9bc37b2044c5d701e0966898ce5e58 100644 (file)
@@ -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