diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-22 13:43:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-24 09:03:18 +0200 |
commit | 81e0f84dcaf27f003c029f5aa8c8e4e67637a6b6 (patch) | |
tree | 8acfd94e83c1e544e1570ee08b125abf598d6797 /common/bootm.c | |
parent | a0dd2f162a3abdd9d0d85eb0874b083672086ab9 (diff) | |
download | barebox-81e0f84dcaf27f003c029f5aa8c8e4e67637a6b6.tar.gz barebox-81e0f84dcaf27f003c029f5aa8c8e4e67637a6b6.tar.xz |
bootm: check for os image file
Check if an os image file has been given.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-rw-r--r-- | common/bootm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c index 14b4cff314..f7e4f9a1b7 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, |