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

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