cmd: usbdown: use full path of loaded file for writing fat part
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 25 Jul 2017 05:29:47 +0000 (14:29 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 10 Oct 2019 04:38:39 +0000 (13:38 +0900)
The update command to FAT partition has wrong file load command
with file name without path which causes reading failure always.
Use full path of loaded file instead of file name for the case
of writing fat partition.

Change-Id: Iee12f440bd4539c5c7a2ec8d197f067ce1fe34d3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
cmd/usbdown.c

index 9257304..8dca3d3 100644 (file)
@@ -413,7 +413,7 @@ int do_update(cmd_tbl_t *cmdtp, int flags, int argc, char * const argv[])
                        sprintf(cmd_buf + strlen(cmd_buf),
                                        " %p", (void *)addr);
                        sprintf(cmd_buf + strlen(cmd_buf),
-                                       " %s", usbdown->name);
+                                       " %s", filename);
                        ret = run_command(cmd_buf, 0);
                        if (ret != CMD_RET_SUCCESS)
                                return ret;