Patchwork [U-Boot,1/2] dfu:ext4:fix Fix ext4{read|write} command formatting

login
register
mail settings
Submitter Łukasz Majewski
Date June 28, 2013, 4:41 p.m.
Message ID <1372437710-6361-1-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/255471/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Łukasz Majewski - June 28, 2013, 4:41 p.m.
In the following commit:
"dfu: Support larger than memory transfers."
SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839

The ext4{read|write} command formatting has been changed. It removed
a write mandatory [sizebytes] parameter.

It extents DFU_FS_EXT4 case at mmc_file_op to provide mandatory
parameter for DFU write.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Tom Rini <trini@ti.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
 drivers/dfu/dfu_mmc.c |    2 ++
 1 file changed, 2 insertions(+)
Tom Rini - July 3, 2013, 7:33 p.m.
On Fri, Jun 28, 2013 at 06:41:49PM +0200, ??ukasz Majewski wrote:

> In the following commit:
> "dfu: Support larger than memory transfers."
> SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
> 
> The ext4{read|write} command formatting has been changed. It removed
> a write mandatory [sizebytes] parameter.
> 
> It extents DFU_FS_EXT4 case at mmc_file_op to provide mandatory
> parameter for DFU write.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Tom Rini <trini@ti.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

Patch

diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index e2f3978..e7ee077 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -98,6 +98,8 @@  static int mmc_file_op(enum dfu_mmc_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), " %ld", *len);
 		break;
 	default:
 		printf("%s: Layout (%s) not (yet) supported!\n", __func__,