2018-09-10 21:32:26 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Mon, 10 Sep 2018 17:29:21 -0400
|
|
|
|
Subject: [PATCH] fw_path: don't prepend / unless we're on http(s)
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
|
|
|
grub-core/kern/main.c | 6 +++++-
|
|
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
2018-09-10 21:39:02 +00:00
|
|
|
index fc8d8c6c9d4..db5238179f8 100644
|
2018-09-10 21:32:26 +00:00
|
|
|
--- a/grub-core/kern/main.c
|
|
|
|
+++ b/grub-core/kern/main.c
|
|
|
|
@@ -130,8 +130,12 @@ grub_set_prefix_and_root (void)
|
|
|
|
if (fwdevice && fwpath)
|
|
|
|
{
|
|
|
|
char *fw_path;
|
|
|
|
+ char separator = '\x0';
|
|
|
|
|
|
|
|
- fw_path = grub_xasprintf ("(%s)%s%s", fwdevice, fwpath[0] == '/' ? "" : "/", fwpath);
|
|
|
|
+ if (!grub_strncmp(fwdevice, "http", 4) && fwpath[0] != '/')
|
|
|
|
+ separator = '/';
|
|
|
|
+
|
2018-09-10 21:39:02 +00:00
|
|
|
+ fw_path = grub_xasprintf ("(%s)%c%s", fwdevice, separator, fwpath);
|
2018-09-10 21:32:26 +00:00
|
|
|
if (fw_path)
|
|
|
|
{
|
|
|
|
grub_env_set ("fw_path", fw_path);
|