]> git.sur5r.net Git - u-boot/blobdiff - cmd/bootefi.c
i2c: mvtwsi: Eliminate flags parameter
[u-boot] / cmd / bootefi.c
index 216906527fe8f5c78bf87a9af6f00426aa7d327e..d66892e69ee963f893321878e961705996a0308f 100644 (file)
@@ -255,7 +255,7 @@ static char bootefi_help_text[] =
 
 U_BOOT_CMD(
        bootefi, 3, 0, do_bootefi,
-       "Boots an EFI payload from memory\n",
+       "Boots an EFI payload from memory",
        bootefi_help_text
 );
 
@@ -290,6 +290,11 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 
        /* Patch bootefi_image_path to the target file path */
        memset(bootefi_image_path[0].str, 0, sizeof(bootefi_image_path[0].str));
-       snprintf(devname, sizeof(devname), "%s", path);
+       if (strcmp(dev, "Net")) {
+               /* Add leading / to fs paths, because they're absolute */
+               snprintf(devname, sizeof(devname), "/%s", path);
+       } else {
+               snprintf(devname, sizeof(devname), "%s", path);
+       }
        ascii2unicode(bootefi_image_path[0].str, devname);
 }