Check if an os image file has been given. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- common/bootm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index 14b4cff..f7e4f9a 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -210,6 +210,11 @@ int bootm_boot(struct image_data *data) int ret; enum filetype os_type, initrd_type = filetype_unknown; + if (!data->os_file) { + printf("no image given\n"); + return -ENOENT; + } + os_type = file_name_detect_type(data->os_file); if ((int)os_type < 0) { printf("could not open %s: %s\n", data->os_file, -- 1.8.4.rc3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox