Re: [PATCH] mkimage: clarify error message for empty input files

2021-09-02 Thread Tom Rini
On Sun, Aug 01, 2021 at 03:23:13PM -0700, Thomas Hebb wrote: > 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

Re: [PATCH] mkimage: clarify error message for empty input files

2021-08-02 Thread Simon Glass
On Sun, 1 Aug 2021 at 16:23, Thomas Hebb wrote: > > 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

Re: [PATCH] mkimage: clarify error message for empty input files

2021-08-01 Thread Tom Hebb
On Sun, Aug 1, 2021 at 3:23 PM Thomas Hebb wrote: > > Currently, an empty imput file causes `mmap()` to fail, and you get an Whoops, s/imput/input/. Didn't catch this before sending it out. > error like "mkimage: Can't read file.img: Invalid argument", which is > extremely unintuitive and hard

[PATCH] mkimage: clarify error message for empty input files

2021-08-01 Thread Thomas Hebb
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