Skip apple ghosts

This commit is contained in:
Vladimir Serbinenko committed 2013-12-24 00:05:22 +01:00
1 parent df056a2788
commit 2f1fd54c38
3 files changed
+22 -10

No files matched your search

+15
View File
@@ -333,6 +333,21 @@ name_devices (struct grub_efidisk_data *devices)
if (! dp) if (! dp)
continue; 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; m = d->block_io->media;
if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_ACPI_DEVICE_PATH_TYPE if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_ACPI_DEVICE_PATH_TYPE
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) && GRUB_EFI_DEVICE_PATH_SUBTYPE (dp)
+1 -2
View File
@@ -89,8 +89,7 @@ struct piwg_full_device_path
.subtype = GRUB_EFI_PIWG_DEVICE_PATH_SUBTYPE, \ .subtype = GRUB_EFI_PIWG_DEVICE_PATH_SUBTYPE, \
.length = sizeof (struct grub_efi_piwg_device_path) \ .length = sizeof (struct grub_efi_piwg_device_path) \
}, \ }, \
.guid = {0x2B0585EB, 0xD8B8, 0x49A9, {0x8B, 0x8C, 0xE2, 0x1B, \ .guid = GRUB_EFI_VENDOR_APPLE_GUID \
0x01, 0xAE, 0xF2, 0xB7}} \
}, \ }, \
.end = \ .end = \
{ \ { \
+6 -8
View File
@@ -280,6 +280,12 @@
{ 0xb1b621d5, 0xf19c, 0x41a5, \ { 0xb1b621d5, 0xf19c, 0x41a5, \
{ 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \ { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \
} }
#define GRUB_EFI_VENDOR_APPLE_GUID \
{ 0x2B0585EB, 0xD8B8, 0x49A9, \
{ 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \
}
struct grub_efi_sal_system_table struct grub_efi_sal_system_table
{ {
grub_uint32_t signature; grub_uint32_t signature;
@@ -815,14 +821,6 @@ typedef struct grub_efi_uart_device_path grub_efi_uart_device_path_t;
#define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE 10 #define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE 10
struct grub_efi_vendor_messaging_device_path
{
grub_efi_device_path_t header;
grub_efi_packed_guid_t vendor_guid;
grub_efi_uint8_t vendor_defined_data[0];
} GRUB_PACKED;
typedef struct grub_efi_vendor_messaging_device_path grub_efi_vendor_messaging_device_path_t;
/* Media Device Path. */ /* Media Device Path. */
#define GRUB_EFI_MEDIA_DEVICE_PATH_TYPE 4 #define GRUB_EFI_MEDIA_DEVICE_PATH_TYPE 4