All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable
Date: Mon, 5 Sep 2011 15:12:48 +0200	[thread overview]
Message-ID: <201109051512.48148.marek.vasut@gmail.com> (raw)
In-Reply-To: <1315220629-9192-1-git-send-email-Bastian.Ruppert@Sewerin.de>

On Monday, September 05, 2011 01:03:49 PM Bastian Ruppert wrote:
> 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);
> +

Hi,

maybe you want to check set_local_var() too ?

>  	page.addr = (void *)addr;
>  	page.index = 0;
>  	page.inode = inode;

  parent reply	other threads:[~2011-09-05 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Marek Vasut [this message]
2011-09-05 14:27   ` [U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable Wolfgang Denk
2011-09-05 15:04     ` Marek Vasut

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=201109051512.48148.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --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 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.