diff options
author | Thomas Hebb <tommyhebb@gmail.com> | 2021-08-01 15:23:13 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-01 19:25:37 -0400 |
commit | eaa6442e4f4883418f595127b5bb12355ca9817d (patch) | |
tree | 977c5b92c8c8a302e3db7a06fd47e57495dc5724 /doc/README.splashprepare | |
parent | 295ab733df05f673117d1576dd257afbba41366b (diff) | |
download | u-boot-eaa6442e4f4883418f595127b5bb12355ca9817d.tar.gz |
mkimage: clarify error message for empty input files
Currently, an empty imput file causes `mmap()` to fail, and you get an
error like "mkimage: Can't read file.img: Invalid argument", which is
extremely unintuitive and hard to diagnose if you don't know what to
look for. Add an explicit check for an empty file and provide a clear
error message instead.
We already bounds check the image size when listing and re-signing
existing images, so we only need this check here, when opening data
files going into a image.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/README.splashprepare')
0 files changed, 0 insertions, 0 deletions