[PATCH 03/11] bootm: check for os image file
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 24 03:08:39 EDT 2013
Check if an os image file has been given.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
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
More information about the barebox
mailing list