From 69915030942771f6813ebc238e86e05b5112f3b5 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 28 Sep 2011 14:07:53 +0200 Subject: [PATCH] * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Return 0 if disk isn't biosdisk. --- ChangeLog | 5 +++++ grub-core/kern/emu/hostdisk.c | 3 +++ 2 files changed, 8 insertions(+) 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)