grub2/grub2-cdpath.patch
Peter Jones 58a808c009 Add some more code to support Secure Boot
Add some more code to support Secure Boot, and temporarily disable
ome other bits that don't work well enough yet.

Resolves: rhbz#836695
2012-07-25 09:35:05 -04:00

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))