dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0447-Add-support-for-crappy-cd-craparino.patch

f96e0b
From abd3c20d447a3c3ed28b9e73b59b5862d3eddf2d Mon Sep 17 00:00:00 2001
f96e0b
From: Matthew Garrett <mjg@redhat.com>
f96e0b
Date: Tue, 10 Jul 2012 11:58:52 -0400
f96e0b
Subject: [PATCH 447/482] Add support for crappy cd craparino
f96e0b
f96e0b
---
f96e0b
 grub-core/disk/efi/efidisk.c | 10 ++++++++++
f96e0b
 1 file changed, 10 insertions(+)
f96e0b
f96e0b
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
f96e0b
index ebd906e..08c303e 100644
f96e0b
--- a/grub-core/disk/efi/efidisk.c
f96e0b
+++ b/grub-core/disk/efi/efidisk.c
f96e0b
@@ -799,6 +799,16 @@ grub_efidisk_get_device_name (grub_efi_handle_t *handle)
f96e0b
   if (! ldp)
f96e0b
     return 0;
f96e0b
 
f96e0b
+  if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE &&
f96e0b
+      (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE))
f96e0b
+    {
f96e0b
+      ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
f96e0b
+      ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
f96e0b
+      ldp->length[0] = 4;
f96e0b
+      ldp->length[1] = 0;
f96e0b
+      ldp = find_last_device_path(dp);
f96e0b
+    }
f96e0b
+
f96e0b
   if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
f96e0b
       && (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp)
f96e0b
 	  == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE))
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b