* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):

Return 0 if disk isn't biosdisk.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-09-28 14:07:53 +02:00
parent 20fd15f9db
commit 6991503094
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-09-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
Return 0 if disk isn't biosdisk.
2011-09-17 Grégoire Sutre <gregoire.sutre@gmail.com> 2011-09-17 Grégoire Sutre <gregoire.sutre@gmail.com>
* Makefile.util.def (grub-mkrelpath): Add LIBUTIL for getrawpartition(3) * Makefile.util.def (grub-mkrelpath): Add LIBUTIL for getrawpartition(3)

View file

@ -1841,6 +1841,9 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk)
struct stat st; struct stat st;
int fd; int fd;
if (disk->dev != &grub_util_biosdisk_dev)
return 0;
fd = open (map[disk->id].device, O_RDONLY); fd = open (map[disk->id].device, O_RDONLY);
/* Shouldn't happen. */ /* Shouldn't happen. */
if (fd == -1) if (fd == -1)