[PATCH] tools: kwboot: Replace fstat()+st_size by lseek()+SEEK_END

Marek Behún marek.behun at nic.cz
Wed Apr 6 21:22:51 CEST 2022


On Wed,  6 Apr 2022 15:18:59 +0200
Pali Rohár <pali at kernel.org> wrote:

> fstat()'s st_size works only for regular files. lseek() with SEEK_END works
> also for block or MTD devices. This replacement allows kwboot to load
> kwbimage from /dev/mtd0 for booting another device over /dev/ttyS0.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Nice.

Reviewed-by: Marek Behún <marek.behun at nic.cz>


More information about the U-Boot mailing list