* [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation
@ 2014-07-16 9:38 Lukasz Majewski
2014-07-21 16:27 ` Stephen Warren
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2014-07-16 9:38 UTC (permalink / raw)
To: u-boot
Commit 1151b7ac10b81ecbb has cleaned up read and write operations.
Unfortunately, for correct operation the write for ext4 fs requires
absolute patch.
This patch fixes this case.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
drivers/dfu/dfu_mmc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 72fa03e..38aeab0 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -117,6 +117,7 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity *dfu,
{
const char *fsname, *opname;
char cmd_buf[DFU_CMD_BUF_SIZE];
+ char *filename = " %s";
char *str_env;
int ret;
@@ -153,7 +154,10 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity *dfu,
if (op != DFU_OP_SIZE)
sprintf(cmd_buf + strlen(cmd_buf), " 0x%x", (unsigned int)buf);
- sprintf(cmd_buf + strlen(cmd_buf), " %s", dfu->name);
+ if (dfu->layout == DFU_FS_EXT4 && op == DFU_OP_WRITE)
+ filename = " /%s";
+
+ sprintf(cmd_buf + strlen(cmd_buf), filename, dfu->name);
if (op == DFU_OP_WRITE)
sprintf(cmd_buf + strlen(cmd_buf), " %lx", *len);
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation
2014-07-16 9:38 [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation Lukasz Majewski
@ 2014-07-21 16:27 ` Stephen Warren
2014-07-22 8:00 ` Lukasz Majewski
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2014-07-21 16:27 UTC (permalink / raw)
To: u-boot
On 07/16/2014 03:38 AM, Lukasz Majewski wrote:
> Commit 1151b7ac10b81ecbb has cleaned up read and write operations.
> Unfortunately, for correct operation the write for ext4 fs requires
> absolute patch.
> This patch fixes this case.
Shouldn't the user simply supply the absolute patch name as the entity
name? That's what I've been doing.
This way, it makes files in sub-directories look more natural; you'd
pass in e.g. /boot/zImage rather than boot/zImage, which looks like a
relative path.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation
2014-07-21 16:27 ` Stephen Warren
@ 2014-07-22 8:00 ` Lukasz Majewski
2014-07-22 14:24 ` Marek Vasut
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2014-07-22 8:00 UTC (permalink / raw)
To: u-boot
Hi Stephen,
> On 07/16/2014 03:38 AM, Lukasz Majewski wrote:
> > Commit 1151b7ac10b81ecbb has cleaned up read and write operations.
> > Unfortunately, for correct operation the write for ext4 fs requires
> > absolute patch.
> > This patch fixes this case.
>
> Shouldn't the user simply supply the absolute patch name as the entity
> name? That's what I've been doing.
>
> This way, it makes files in sub-directories look more natural; you'd
> pass in e.g. /boot/zImage rather than boot/zImage, which looks like a
> relative path.
Hmm.. this is the angle from which I didn't look.
Thanks for the tip. I will adjust envs accordingly. Please discard this
patch.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation
2014-07-22 8:00 ` Lukasz Majewski
@ 2014-07-22 14:24 ` Marek Vasut
0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2014-07-22 14:24 UTC (permalink / raw)
To: u-boot
On Tuesday, July 22, 2014 at 10:00:05 AM, Lukasz Majewski wrote:
> Hi Stephen,
>
> > On 07/16/2014 03:38 AM, Lukasz Majewski wrote:
> > > Commit 1151b7ac10b81ecbb has cleaned up read and write operations.
> > > Unfortunately, for correct operation the write for ext4 fs requires
> > > absolute patch.
> > > This patch fixes this case.
> >
> > Shouldn't the user simply supply the absolute patch name as the entity
> > name? That's what I've been doing.
> >
> > This way, it makes files in sub-directories look more natural; you'd
> > pass in e.g. /boot/zImage rather than boot/zImage, which looks like a
> > relative path.
>
> Hmm.. this is the angle from which I didn't look.
>
> Thanks for the tip. I will adjust envs accordingly. Please discard this
> patch.
Done.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-22 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 9:38 [U-Boot] [PATCH] dfu: fix: Add the absolute path to the file name for ext4 write operation Lukasz Majewski
2014-07-21 16:27 ` Stephen Warren
2014-07-22 8:00 ` Lukasz Majewski
2014-07-22 14:24 ` Marek Vasut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.