public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] tools: mkimage: hdr_size used to facilitate customized support
Date: Sat, 18 Jul 2009 23:33:53 +0200	[thread overview]
Message-ID: <20090718213353.541DB832E416@gemini.denx.de> (raw)
In-Reply-To: <1247967958-4446-1-git-send-email-prafulla@marvell.com>

Dear Prafulla Wadaskar,

In message <1247967958-4446-1-git-send-email-prafulla@marvell.com> you wrote:
> hdr_size variable is initialized
> at the start of image creation algorithm instead of reading it each time.
> This facilitate to use the common code for other image type implementations
> for ex. kwbimage

Hm... I have no idea what you are trying to do, or why. You are aware
that image_get_header_size()  is  a  static  inline,  returning  just
"sizeof (image_header_t)"?

As far as the context of mkimage goes, you could as well consider it a
constant.

> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
> ---
>  tools/mkimage.c |   18 ++++++++----------
>  1 files changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/mkimage.c b/tools/mkimage.c
> index 967fe9a..c5b593c 100644
> --- a/tools/mkimage.c
> +++ b/tools/mkimage.c
> @@ -250,9 +250,10 @@ NXTARG:		;
>  	 *
>  	 * write dummy header, to be fixed later
>  	 */
> -	memset (hdr, 0, image_get_header_size ());
> -
> -	if (write(ifd, hdr, image_get_header_size ()) != image_get_header_size ()) {
> +	int hdr_size;

We don't allow variable declarations in the middle of the code.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Objects in mirror are closer than they appear.

  reply	other threads:[~2009-07-18 21:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19  1:45 [U-Boot] [PATCH 1/3] tools: mkimage: hdr_size used to facilitate customized support Prafulla Wadaskar
2009-07-18 21:33 ` Wolfgang Denk [this message]
2009-07-19  5:41   ` Prafulla Wadaskar
2009-07-19  1:45 ` [U-Boot] [PATCH 2/3] tools: mkimage (type=kwbimage) kirkwood boot image support Prafulla Wadaskar
2009-07-18 21:25   ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-20  6:55     ` Prafulla Wadaskar
2009-07-18 22:02   ` Wolfgang Denk
2009-07-19  5:27     ` Prafulla Wadaskar
2009-07-20  6:24       ` Prafulla Wadaskar
2009-07-20 15:05         ` Wolfgang Denk
2009-07-20 14:57       ` Wolfgang Denk
2009-07-22  7:20         ` Prafulla Wadaskar
2009-07-19  1:45   ` [U-Boot] [PATCH 3/3] Kirkwood: Sheevaplug: kwimage configuration Prafulla Wadaskar
2009-07-18 21:26     ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-19  4:41       ` Prafulla Wadaskar

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=20090718213353.541DB832E416@gemini.denx.de \
    --to=wd@denx.de \
    --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