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

Signed-off-by: Rob Clark <robdcl...@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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to