[U-Boot] [PATCH] tools/mkimage: use lseek rather than fstat for file size for -l option
Wolfgang Denk
wd at denx.de
Wed Dec 3 12:54:01 CET 2008
Dear Peter Korsgaard,
In message <87ljuxzosn.fsf at macbook.be.48ers.dk> you wrote:
>
> Wolfgang> Later, you should get data checksum errors because of the
> Wolfgang> incorrect lenght, i. e. a ``ERROR: "<image>" has
> Wolfgang> corrupted data!'' error message.
>
> Exactly, hence my other patch (tools/mkimage: ignore trailing garbage)
> to only error out if the size is smaller than the size defined in the
> header.
This doesn't make sense to me. If we have a way to check the image, we
want to check everything, including correct image length.
> Wolfgang> If you don't use *stat(), you should not use any struct
> Wolfgang> stat type either.
>
> Ok, I kept it like that to keep the patch as minimal as possible -
> I'll change it and resend.
I think it makes little sense as my feeling is the changes make
mkimage checking not better, just worse.
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
Honest error is to be pitied, not ridiculed.
-- Philip Earl of Chesterfield
More information about the U-Boot
mailing list