[PATCH] mkimage: allow -l to work on block devices on Linux
Tom Rini
trini at konsulko.com
Thu Jul 15 03:27:31 CEST 2021
On Tue, May 18, 2021 at 10:59:04AM +0200, yann.dirson at blade-group.com wrote:
> From: Yann Dirson <yann at blade-group.com>
>
> When "mkimage -l" was run on a block device it would fail with
> erroneous message, because fstat reports a size of zero for those:
>
> mkimage: Bad size: "/dev/sdb4" is not valid image
>
> This patch identifies the "is a block device" case and reports it as
> such, and if it knows how to determine the size of a block device on
> the current OS, proceeds.
>
> As shown in
> http://www.mit.edu/afs.new/sipb/user/tytso/e2fsprogs/lib/blkid/getsize.c
> this is no portable task, and I only handled the case of a modern
> Linux kernel, which is what I can test.
>
> Signed-off-by: Yann Dirson <yann at blade-group.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210714/03c8e06b/attachment.sig>
More information about the U-Boot
mailing list