[U-Boot] [PATCH v2 3/4] tools: mkimage: kwbimage list command support

Prafulla Wadaskar prafulla at marvell.com
Wed Jul 22 13:46:43 CEST 2009


 

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de] 
> Sent: Wednesday, July 22, 2009 4:11 PM
> To: Prafulla Wadaskar
> Cc: u-boot at lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik
> Subject: Re: [U-Boot] [PATCH v2 3/4] tools: mkimage: kwbimage 
> list command support
> 
> > > > +		if (!(kwbimage_check_header ((struct kwb_header
> > > *)ptr))) {
> > > > +			kwbimage_print_contents ((struct
> > > kwb_header *)ptr);
> > > > +			exit (EXIT_SUCCESS);
> > > 
> > > I think you should add error checking here. For example, when the 
> > > code detects a corruption of the image (checksum error or 
> the like), 
> > > it should return an error code here, so you can use 
> "mkimage -l" to 
> > > actually verify the consistency of an image (in automated 
> scripts).
> > Currently mkimage checks first kwbimage header followed by ftd/fit 
> > header c hecks In that case returning an error code will 
> not be useful
> 
> I don't understand what you mean here. Any corruption of an 
> image should be detected and signalled to the caller by a 
> non-zero return code of the mkimage command.
My answer was only related to kwbimage point of view
your comment is more towards existing code cleanup, yes it returns success even though header check fails
I will do it as a part of mkimage code cleanup.

Thanks and regards..
Prafulla . .


More information about the U-Boot mailing list