diff --git a/ChangeLog b/ChangeLog index a454f2f84..9d19fe450 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-28 Vladimir Serbinenko + + * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): + Return 0 if disk isn't biosdisk. + 2011-09-17 Grégoire Sutre * Makefile.util.def (grub-mkrelpath): Add LIBUTIL for getrawpartition(3) diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index b4c4eef7c..a9a8c066e 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -1841,6 +1841,9 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk) struct stat st; int fd; + if (disk->dev != &grub_util_biosdisk_dev) + return 0; + fd = open (map[disk->id].device, O_RDONLY); /* Shouldn't happen. */ if (fd == -1)