summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann Dirson <yann@blade-group.com>2021-05-18 11:59:04 +0300
committerTom Rini <trini@konsulko.com>2021-07-14 23:57:35 +0300
commit331f0800f1a3ddf6b365c65a37d0bfc5114b0c02 (patch)
tree9ed3355438915de65d69eb4c6411e384fa92696f /scripts
parenteae8c7c33829c3bd25a792600c1fe6ed842a1ddc (diff)
downloadu-boot-331f0800f1a3ddf6b365c65a37d0bfc5114b0c02.tar.xz
mkimage: allow -l to work on block devices on Linux
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@blade-group.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions