public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable
@ 2011-09-05 11:03 Bastian Ruppert
  2011-09-05 11:27 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Bastian Ruppert @ 2011-09-05 11:03 UTC (permalink / raw)
  To: u-boot

This is the same behaviour like tftp or fatload command.

Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
CC: kmpark at infradead.org
---
 fs/ubifs/ubifs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 5a5c739..2b9d2d2 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -688,6 +688,7 @@ int ubifs_load(char *filename, u32 addr, u32 size)
 	int i;
 	int count;
 	int last_block_size = 0;
+	char buf [10];
 
 	c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY);
 	/* ubifs_findfile will resolve symlinks, so we know that we get
@@ -719,6 +720,9 @@ int ubifs_load(char *filename, u32 addr, u32 size)
 	printf("Loading file '%s' to addr 0x%08x with size %d (0x%08x)...\n",
 	       filename, addr, size, size);
 
+	sprintf(buf, "%lX", size);
+	setenv("filesize", buf);
+
 	page.addr = (void *)addr;
 	page.index = 0;
 	page.inode = inode;
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-10 20:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 11:03 [U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable Bastian Ruppert
2011-09-05 11:27 ` Wolfgang Denk
2011-09-05 13:03 ` [U-Boot] [PATCH v2] " Bastian Ruppert
2011-09-09 12:12   ` Detlev Zundel
2011-09-09 22:04   ` Wolfgang Denk
2011-09-09 22:43   ` [U-Boot] [PATCH] UBIFS: fix warning: format '%lX' expects type 'long unsigned int' Wolfgang Denk
2011-09-10 20:40     ` Wolfgang Denk
2011-09-05 13:12 ` [U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable Marek Vasut
2011-09-05 14:27   ` Wolfgang Denk
2011-09-05 15:04     ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox