Skip to content

Commit

Permalink
* grub-core/disk/efi/efidisk.c (name_devices): Skip Apple ghosts.
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder committed Dec 24, 2013
1 parent 46f8d35 commit dc3286a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2013-12-24 Vladimir Serbinenko <[email protected]>

* grub-core/disk/efi/efidisk.c (name_devices): Skip Apple ghosts.

2013-12-24 Andrey Borzenkov <[email protected]>

* util/grub-probe.c: Improve help message and simplify list handling.
Expand Down
15 changes: 15 additions & 0 deletions grub-core/disk/efi/efidisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,21 @@ name_devices (struct grub_efidisk_data *devices)
if (! dp)
continue;

/* Ghosts proudly presented by Apple. */
if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (dp)
== GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE)
{
grub_efi_vendor_device_path_t *vendor = (grub_efi_vendor_device_path_t *) dp;
const struct grub_efi_guid apple = GRUB_EFI_VENDOR_APPLE_GUID;

if (vendor->header.length == sizeof (*vendor)
&& grub_memcmp (&vendor->vendor_guid, &apple,
sizeof (vendor->vendor_guid)) == 0
&& find_parent_device (devices, d))
continue;
}

m = d->block_io->media;
if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_ACPI_DEVICE_PATH_TYPE
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (dp)
Expand Down

0 comments on commit dc3286a

Please sign in to comment.