summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2014-02-20 10:29:18 +0100
committerTom Rini <trini@ti.com>2014-02-20 12:00:27 -0500
commit17eb1d8f5717ec42fe5a5872f1bf413aedf3614c (patch)
treee5f3b88f1fd7c22211a1253903217a69bc4e4bbc /drivers
parent3241e3d08c8e43b72e1c83fd44a2eb3bbbe511f8 (diff)
downloadu-boot-imx-17eb1d8f5717ec42fe5a5872f1bf413aedf3614c.zip
u-boot-imx-17eb1d8f5717ec42fe5a5872f1bf413aedf3614c.tar.gz
u-boot-imx-17eb1d8f5717ec42fe5a5872f1bf413aedf3614c.tar.bz2
dfu: mmc: fs: Fix format accepted by ext4write command
The commit: "EXT4: Fix number base handling of "ext4write" command" SHA1: f7740f7712b8638f08b83a7e5d00bc1d6bb086a9 Cleaned up the ext4write command format. This commit shall be regarded as a follow up, since the DFU subsystem is using those commands for its normal operation. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dfu/dfu_mmc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index f942758..0816f46 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -73,16 +73,12 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity *dfu,
op == DFU_OP_READ ? "load" : "write",
dfu->data.mmc.dev, dfu->data.mmc.part,
(unsigned int) buf, dfu->name);
- if (op == DFU_OP_WRITE)
- sprintf(cmd_buf + strlen(cmd_buf), " %lx", *len);
break;
case DFU_FS_EXT4:
sprintf(cmd_buf, "ext4%s mmc %d:%d 0x%x /%s",
op == DFU_OP_READ ? "load" : "write",
dfu->data.mmc.dev, dfu->data.mmc.part,
(unsigned int) buf, dfu->name);
- if (op == DFU_OP_WRITE)
- sprintf(cmd_buf + strlen(cmd_buf), " %ld", *len);
break;
default:
printf("%s: Layout (%s) not (yet) supported!\n", __func__,
@@ -90,6 +86,9 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity *dfu,
return -1;
}
+ if (op == DFU_OP_WRITE)
+ sprintf(cmd_buf + strlen(cmd_buf), " %lx", *len);
+
debug("%s: %s 0x%p\n", __func__, cmd_buf, cmd_buf);
ret = run_command(cmd_buf, 0);