[U-Boot] [PATCH v2] tools/mkimage: use lseek rather than fstat for file size for -l option

Wolfgang Denk wd at denx.de
Wed Dec 3 12:55:59 CET 2008


Dear Peter Korsgaard,

In message <1228304125-6669-2-git-send-email-jacmet at sunsite.dk> you wrote:
> Use lseek rather than fstat for file size for list mode, so
> mkimage -l /dev/mtdblockN works (stat returns st_size == 0 for devices).
> 
> Notice that you have to use /dev/mtdblockN and not /dev/mtdN, as the
> latter doesn't support mmap.
> 
> Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>

As mentioned before, this doesn't work because the length you are
checking is not the image length, but the device size.

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
Eeeek!
'eval' on strings should have been named 'evil'.    -- Tom Phoenix in
        <Pine.GSO.3.96.980526121813.27437N-100000 at user2.teleport.com>


More information about the U-Boot mailing list