Blame SOURCES/0177-don-t-strip-fw_path-twice-for-EFI-network-boot.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: RHEL Ninjas <example@example.com>
f731ee
Date: Mon, 13 Apr 2015 12:42:53 +1000
f731ee
Subject: [PATCH] don't strip fw_path twice for EFI network boot
f731ee
f731ee
---
f731ee
 grub-core/kern/efi/init.c | 7 ++++++-
f731ee
 1 file changed, 6 insertions(+), 1 deletion(-)
f731ee
f731ee
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
f731ee
index 942ab0256b9..c391df48236 100644
f731ee
--- a/grub-core/kern/efi/init.c
f731ee
+++ b/grub-core/kern/efi/init.c
f731ee
@@ -61,7 +61,12 @@ grub_machine_get_bootlocation (char **device, char **path)
f731ee
   *device = grub_efidisk_get_device_name (image->device_handle);
f731ee
   *path = grub_efi_get_filename (image->file_path);
f731ee
   if (!*device && grub_efi_net_config)
f731ee
-    grub_efi_net_config (image->device_handle, device, path);
f731ee
+    {
f731ee
+      grub_efi_net_config (image->device_handle, device, path);
f731ee
+      /* grub_efi_net_config returns the directory path, not the boot filename,
f731ee
+         so don't strip any further. */
f731ee
+      return;
f731ee
+    }
f731ee
 
f731ee
   /* Get the directory.  */
f731ee
   p = grub_strrchr (*path, '/');