From: Peter Korsgaard Date: Wed, 03 Dec 2008 13:07:31 +0100 Subject: [U-Boot] [PATCH] tools/mkimage: use lseek rather than fstat for file size for -l option In-Reply-To: <20081203115401.24D0B834B020@gemini.denx.de> (Wolfgang Denk's message of "Wed\, 03 Dec 2008 12\:54\:01 +0100") References: <1228148597-22359-1-git-send-email-jacmet@sunsite.dk> <1228148597-22359-2-git-send-email-jacmet@sunsite.dk> <9d133f60812012348o663f24d5g774dbceaa71a0e66@mail.gmail.com> <87vdu2tka2.fsf@macbook.be.48ers.dk> <20081203002254.473EB834B020@gemini.denx.de> <87ljuxzosn.fsf@macbook.be.48ers.dk> <20081203115401.24D0B834B020@gemini.denx.de> Message-ID: <87ej0pxy0s.fsf@macbook.be.48ers.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >>>>> "Wolfgang" == Wolfgang Denk writes: Hi, >> 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. Wolfgang> This doesn't make sense to me. If we have a way to check Wolfgang> the image, we want to check everything, including correct Wolfgang> image length. I provided a reason for the change in the patch: "E.G. if the uImage was stored in flash and hence padded to the flash sector size" I can add a warning if there's trailing garbage if you prefer, but I think the use case is valid. >> Ok, I kept it like that to keep the patch as minimal as possible - >> I'll change it and resend. Wolfgang> I think it makes little sense as my feeling is the changes make Wolfgang> mkimage checking not better, just worse. Ok, fixed in the v2 patch I recently sent. -- Bye, Peter Korsgaard