Skip to content
Snippets Groups Projects
Commit 46d7274c authored by Bastian Ruppert's avatar Bastian Ruppert Committed by Wolfgang Denk
Browse files

UBIFS: Change ubifsload to set the filesize variable


This is the same behaviour like tftp or fatload command.

Signed-off-by: default avatarBastian Ruppert <Bastian.Ruppert@Sewerin.de>
CC: kmpark@infradead.org
Acked-by: default avatarDetlev Zundel <dzu@denx.de>
parent 21726a7a
No related branches found
No related tags found
No related merge requests found
...@@ -686,6 +686,7 @@ int ubifs_load(char *filename, u32 addr, u32 size) ...@@ -686,6 +686,7 @@ int ubifs_load(char *filename, u32 addr, u32 size)
int i; int i;
int count; int count;
int last_block_size = 0; int last_block_size = 0;
char buf [10];
c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY); 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 /* ubifs_findfile will resolve symlinks, so we know that we get
...@@ -737,8 +738,11 @@ int ubifs_load(char *filename, u32 addr, u32 size) ...@@ -737,8 +738,11 @@ int ubifs_load(char *filename, u32 addr, u32 size)
if (err) if (err)
printf("Error reading file '%s'\n", filename); printf("Error reading file '%s'\n", filename);
else else {
sprintf(buf, "%lX", size);
setenv("filesize", buf);
printf("Done\n"); printf("Done\n");
}
ubifs_iput(inode); ubifs_iput(inode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment