summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/mkimage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 0b342159e5f..5e0bb91cea0 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -600,6 +600,11 @@ int main(int argc, char **argv)
}
if ((params.type != IH_TYPE_MULTI) && (params.type != IH_TYPE_SCRIPT)) {
+ if (!params.datafile) {
+ fprintf(stderr, "%s: Option -d with image data file was not specified\n",
+ params.cmdname);
+ exit(EXIT_FAILURE);
+ }
dfd = open(params.datafile, O_RDONLY | O_BINARY);
if (dfd < 0) {
fprintf(stderr, "%s: Can't open %s: %s\n",