mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 15:46:53 +00:00
26 lines
957 B
Diff
26 lines
957 B
Diff
|
From: Matthew Garrett <mjg@redhat.com>
|
||
|
Date: 2012-07-10 11:58:52 EDT
|
||
|
Subject: [PATCH] Add support for crappy cd craparino
|
||
|
|
||
|
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
|
||
|
index d9d788c..a432b44 100644
|
||
|
--- a/grub-core/disk/efi/efidisk.c
|
||
|
+++ b/grub-core/disk/efi/efidisk.c
|
||
|
@@ -750,6 +750,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))
|