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>
This commit is contained in:
Andrei Borzenkov 2016-02-23 23:14:41 +03:00
parent 15dfea842c
commit 1b782e902e
1 changed files with 1 additions and 1 deletions

View 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