From 3a38d333bfdcdca7546b7c005453cd02a78c8423 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 10 Jul 2012 11:58:52 -0400 Subject: [PATCH 347/364] Add support for crappy cd craparino --- grub-core/disk/efi/efidisk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index e168d07..3a006ab 100644 --- a/grub-core/disk/efi/efidisk.c +++ b/grub-core/disk/efi/efidisk.c @@ -794,6 +794,16 @@ grub_efidisk_get_device_name (grub_efi_handle_t *handle) if (! ldp) return 0; + if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE && + (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE)) + { + ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE; + ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; + ldp->length[0] = 4; + ldp->length[1] = 0; + ldp = find_last_device_path(dp); + } + if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE && (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)) -- 1.8.1.4