481bf3bbf7
Signed-off-by: Peter Jones <pjones@redhat.com>
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From d663a99ed928038306d3db96de500bbf258f37cf Mon Sep 17 00:00:00 2001
|
|
From: Matthew Garrett <mjg@redhat.com>
|
|
Date: Tue, 10 Jul 2012 11:58:52 -0400
|
|
Subject: [PATCH 04/37] Add support for crappy cd craparino
|
|
|
|
---
|
|
grub-core/disk/efi/efidisk.c | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
|
|
index 3b12c34..9aaa01a 100644
|
|
--- a/grub-core/disk/efi/efidisk.c
|
|
+++ b/grub-core/disk/efi/efidisk.c
|
|
@@ -799,6 +799,20 @@ 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))
|
|
+ {
|
|
+ grub_efi_uint8_t length[2];
|
|
+ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
|
|
+ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
|
|
+
|
|
+ length[0] = 4;
|
|
+ length[1] = 0;
|
|
+ grub_memcpy (&ldp->length, length, sizeof(ldp->length));
|
|
+
|
|
+ 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_CDROM_DEVICE_PATH_SUBTYPE
|
|
|| GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE))
|
|
--
|
|
1.8.4.2
|
|
|