Commit e324a92531e1dc092949b8a00745afd2328e178e

Authored by Simon Glass
Committed by Tom Rini
1 parent 3c23c0feac

mkimage: Require a data file when auto-fit is used

When auto-fit is used, it is not valid to create a FIT without an image
file. Add a check for this to avoid a very confusing error message later
("Can't open (null): Bad address").

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -276,6 +276,8 @@
276 276 /* For auto_its, datafile is always 'auto' */
277 277 if (!params.auto_its)
278 278 params.datafile = datafile;
  279 + else if (!params.datafile)
  280 + usage("Missing data file for auto-FIT (use -d)");
279 281 } else if (type != IH_TYPE_INVALID) {
280 282 params.type = type;
281 283 }