[U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style
Rob Clark
robdclark at gmail.com
Mon Jul 24 11:59:09 UTC 2017
shim.efi, for example, actually tries to parse this, but is expecting
backslashes.
Signed-off-by: Rob Clark <robdclark at 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
More information about the U-Boot
mailing list