public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style
Date: Mon, 24 Jul 2017 07:59:09 -0400	[thread overview]
Message-ID: <20170724115911.17907-1-robdclark@gmail.com> (raw)

shim.efi, for example, actually tries to parse this, but is expecting
backslashes.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 cmd/bootefi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index b6d5047301..689eb09942 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -379,7 +379,7 @@ static int parse_partnum(const char *devnr)
 void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 {
 	char devname[32] = { 0 }; /* dp->str is u16[32] long */
-	char *colon;
+	char *colon, *s;
 
 #if defined(CONFIG_BLK) || CONFIG_IS_ENABLED(ISO_PARTITION)
 	desc = blk_get_dev(dev, simple_strtol(devnr, NULL, 10));
@@ -431,6 +431,10 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 	} else {
 		snprintf(devname, sizeof(devname), "%s", path);
 	}
+	/* DOS style file path: */
+	s = devname;
+	while ((s = strchr(s, '/')))
+		*s++ = '\\';
 	ascii2unicode(bootefi_image_path[0].str, devname);
 
 	loaded_image_info.device_handle = real_bootefi_device_path;
-- 
2.13.0

             reply	other threads:[~2017-07-24 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 11:59 Rob Clark [this message]
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
2017-07-24 12:36   ` Alexander Graf
2017-07-24 12:53     ` Rob Clark
2017-07-24 13:05       ` Alexander Graf
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: move guidcmp to header Rob Clark
2017-07-28 22:25   ` [U-Boot] " Alexander Graf
2017-07-28 22:28 ` [U-Boot] efi_loader: EFI file paths should be DOS style Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170724115911.17907-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox