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

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