]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/disk/efi/efidisk.c (name_devices): Skip Apple ghosts.
authorVladimir Serbinenko <phcoder@gmail.com>
Tue, 24 Dec 2013 19:32:14 +0000 (20:32 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Tue, 24 Dec 2013 19:32:14 +0000 (20:32 +0100)
ChangeLog
grub-core/disk/efi/efidisk.c

index 9931c96bc35289ef57a97d0719c13780595399a4..3545ea1a6f36613fe780e903c492ed5586b098fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/disk/efi/efidisk.c (name_devices): Skip Apple ghosts.
+
 2013-12-24  Andrey Borzenkov <arvidjaar@gmail.com>
 
        * util/grub-probe.c: Improve help message and simplify list handling.
index e04203fe0b1d67d867f55bdece04f83a18967404..3b12c3499231f25215f3650073c8e84c76a4fa57 100644 (file)
@@ -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)