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

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