summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorBastian Ruppert <Bastian.Ruppert@Sewerin.de>2011-09-05 03:03:57 +0000
committerWolfgang Denk <wd@denx.de>2011-09-10 00:04:29 +0200
commit46d7274cdcacc581bd02881e0aee4bb1a73e6f3a (patch)
treecca84e4cf16f1c77d16d2f303db46573866d2d0b /fs/ubifs
parent21726a7afce16b882b5cedf70a0c112caea945be (diff)
downloadu-boot-imx-46d7274cdcacc581bd02881e0aee4bb1a73e6f3a.zip
u-boot-imx-46d7274cdcacc581bd02881e0aee4bb1a73e6f3a.tar.gz
u-boot-imx-46d7274cdcacc581bd02881e0aee4bb1a73e6f3a.tar.bz2
UBIFS: Change ubifsload to set the filesize variable
This is the same behaviour like tftp or fatload command. Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> CC: kmpark@infradead.org Acked-by: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/ubifs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 61f70b2..2e6313a 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -686,6 +686,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
@@ -737,8 +738,11 @@ int ubifs_load(char *filename, u32 addr, u32 size)
if (err)
printf("Error reading file '%s'\n", filename);
- else
+ else {
+ sprintf(buf, "%lX", size);
+ setenv("filesize", buf);
printf("Done\n");
+ }
ubifs_iput(inode);