From: Rod Boyce <rod@teamboyce.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch] Update filesize environment variable on ubifs_load
Date: Sat, 18 Jun 2011 11:30:18 +0100 [thread overview]
Message-ID: <4DFC7E3A.9050707@teamboyce.co.uk> (raw)
Add functionality to update filesize environment variable when
ubifs_load is called to read a file from filesystem
Signed-off-by: Rod Boyce <uboot@teamboyce.co.uk>
------------------------------- fs/ubifs/ubifs.c
------------------------------
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 61f70b2..17097f2 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -686,6 +686,7 @@
int i;
int count;
int last_block_size = 0;
+ char buf[32];
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
@@ -716,6 +717,8 @@
count = (size + UBIFS_BLOCK_SIZE - 1) >> UBIFS_BLOCK_SHIFT;
printf("Loading file '%s' to addr 0x%08x with size %d (0x%08x)...\n",
filename, addr, size, size);
+ sprintf( buf, "%X", size );
+ setenv( "filesize", buf );
page.addr = (void *)addr;
page.index = 0;
next reply other threads:[~2011-06-18 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-18 10:30 Rod Boyce [this message]
2011-06-29 8:41 ` [U-Boot] [Patch] Update filesize environment variable on ubifs_load Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DFC7E3A.9050707@teamboyce.co.uk \
--to=rod@teamboyce.co.uk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox