* grub-core/disk/efi/efidisk.c: Detect floppies by ACPI ID.
It improves performance in qemu.
This commit is contained in:
parent
a0f8f3acf1
commit
b193e10034
2 changed files with 19 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-04-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/efi/efidisk.c: Detect floppies by ACPI ID.
|
||||
It improves performance in qemu.
|
||||
|
||||
2013-04-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* build-aux/snippet: Add missing gnulib files.
|
||||
|
|
|
@ -329,18 +329,28 @@ name_devices (struct grub_efidisk_data *devices)
|
|||
{
|
||||
grub_efi_device_path_t *dp;
|
||||
grub_efi_block_io_media_t *m;
|
||||
int is_floppy = 0;
|
||||
|
||||
dp = d->last_device_path;
|
||||
if (! dp)
|
||||
continue;
|
||||
|
||||
m = d->block_io->media;
|
||||
if (m->logical_partition)
|
||||
if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_ACPI_DEVICE_PATH_TYPE
|
||||
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (dp)
|
||||
== GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE)
|
||||
{
|
||||
grub_efi_acpi_device_path_t *acpi
|
||||
= (grub_efi_acpi_device_path_t *) dp;
|
||||
/* Floppy EISA ID. */
|
||||
if (acpi->hid == 0x60441d0 || acpi->hid == 0x70041d0
|
||||
|| acpi->hid == 0x70141d1)
|
||||
is_floppy = 1;
|
||||
}
|
||||
if (is_floppy)
|
||||
{
|
||||
/* Only one partition in a non-media device. Assume that this
|
||||
is a floppy drive. */
|
||||
#ifdef DEBUG_NAMES
|
||||
grub_printf ("adding a floppy by guessing: ");
|
||||
grub_printf ("adding a floppy: ");
|
||||
grub_efi_print_device_path (d->device_path);
|
||||
#endif
|
||||
add_device (&fd_devices, d);
|
||||
|
|
Loading…
Reference in a new issue