* grub-core/disk/efi/efidisk.c (name_devices): Don't make disks
out of partitions containing other partitions.
This commit is contained in:
parent
c5c81ff978
commit
3d2de9a7ba
2 changed files with 43 additions and 22 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-06-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/disk/efi/efidisk.c (name_devices): Don't make disks
|
||||||
|
out of partitions containing other partitions.
|
||||||
|
|
||||||
2012-06-07 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-06-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Pass PCIINFO on BIOS to OpenBSD since otherwise it fails to boot
|
Pass PCIINFO on BIOS to OpenBSD since otherwise it fails to boot
|
||||||
|
|
|
@ -271,31 +271,47 @@ name_devices (struct grub_efidisk_data *devices)
|
||||||
/* Fall through by intention. */
|
/* Fall through by intention. */
|
||||||
case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
|
case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
|
||||||
{
|
{
|
||||||
struct grub_efidisk_data *parent;
|
struct grub_efidisk_data *parent, *parent2;
|
||||||
|
|
||||||
parent = find_parent_device (devices, d);
|
parent = find_parent_device (devices, d);
|
||||||
if (parent)
|
if (!parent)
|
||||||
{
|
{
|
||||||
if (is_hard_drive)
|
|
||||||
{
|
|
||||||
#if 0
|
#if 0
|
||||||
grub_printf ("adding a hard drive by a partition: ");
|
grub_printf ("skipping orphaned partition: ");
|
||||||
grub_print_device_path (parent->device_path);
|
grub_efi_print_device_path (parent->device_path);
|
||||||
#endif
|
#endif
|
||||||
add_device (&hd_devices, parent);
|
break;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
grub_printf ("adding a cdrom by a partition: ");
|
|
||||||
grub_print_device_path (parent->device_path);
|
|
||||||
#endif
|
|
||||||
add_device (&cd_devices, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mark the parent as used. */
|
|
||||||
parent->last_device_path = 0;
|
|
||||||
}
|
}
|
||||||
|
parent2 = find_parent_device (devices, parent);
|
||||||
|
if (parent2)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
grub_printf ("skipping subpartition: ");
|
||||||
|
grub_efi_print_device_path (parent->device_path);
|
||||||
|
#endif
|
||||||
|
/* Mark itself as used. */
|
||||||
|
d->last_device_path = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (is_hard_drive)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
grub_printf ("adding a hard drive by a partition: ");
|
||||||
|
grub_efi_print_device_path (parent->device_path);
|
||||||
|
#endif
|
||||||
|
add_device (&hd_devices, parent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
grub_printf ("adding a cdrom by a partition: ");
|
||||||
|
grub_efi_print_device_path (parent->device_path);
|
||||||
|
#endif
|
||||||
|
add_device (&cd_devices, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mark the parent as used. */
|
||||||
|
parent->last_device_path = 0;
|
||||||
}
|
}
|
||||||
/* Mark itself as used. */
|
/* Mark itself as used. */
|
||||||
d->last_device_path = 0;
|
d->last_device_path = 0;
|
||||||
|
@ -325,7 +341,7 @@ name_devices (struct grub_efidisk_data *devices)
|
||||||
is a floppy drive. */
|
is a floppy drive. */
|
||||||
#if 0
|
#if 0
|
||||||
grub_printf ("adding a floppy by guessing: ");
|
grub_printf ("adding a floppy by guessing: ");
|
||||||
grub_print_device_path (d->device_path);
|
grub_efi_print_device_path (d->device_path);
|
||||||
#endif
|
#endif
|
||||||
add_device (&fd_devices, d);
|
add_device (&fd_devices, d);
|
||||||
}
|
}
|
||||||
|
@ -335,7 +351,7 @@ name_devices (struct grub_efidisk_data *devices)
|
||||||
CDROM drive. */
|
CDROM drive. */
|
||||||
#if 0
|
#if 0
|
||||||
grub_printf ("adding a cdrom by guessing: ");
|
grub_printf ("adding a cdrom by guessing: ");
|
||||||
grub_print_device_path (d->device_path);
|
grub_efi_print_device_path (d->device_path);
|
||||||
#endif
|
#endif
|
||||||
add_device (&cd_devices, d);
|
add_device (&cd_devices, d);
|
||||||
}
|
}
|
||||||
|
@ -344,7 +360,7 @@ name_devices (struct grub_efidisk_data *devices)
|
||||||
/* The default is a hard drive. */
|
/* The default is a hard drive. */
|
||||||
#if 0
|
#if 0
|
||||||
grub_printf ("adding a hard drive by guessing: ");
|
grub_printf ("adding a hard drive by guessing: ");
|
||||||
grub_print_device_path (d->device_path);
|
grub_efi_print_device_path (d->device_path);
|
||||||
#endif
|
#endif
|
||||||
add_device (&hd_devices, d);
|
add_device (&hd_devices, d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue