diff options
author | Marek Vasut <marex@denx.de> | 2016-04-29 00:44:54 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-05-17 17:52:20 +0200 |
commit | 7e0f22674ae871460706f9cc8653487bb51e0804 (patch) | |
tree | 604b55f32c78eee29614bfd6a99d7525f168384d /common/spl/spl_ext.c | |
parent | 249092fa81f3dd3fee94fd05973833e30405f3c4 (diff) | |
download | u-boot-7e0f22674ae871460706f9cc8653487bb51e0804.tar.gz |
SPL: Let spl_parse_image_header() return value
Allow the spl_parse_image_header() to return value. This is convenient
for controlling the SPL boot flow if the loaded image is corrupted.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl_ext.c')
-rw-r--r-- | common/spl/spl_ext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c index b77dbf4d0c..ade5496600 100644 --- a/common/spl/spl_ext.c +++ b/common/spl/spl_ext.c @@ -48,7 +48,11 @@ int spl_load_image_ext(struct blk_desc *block_dev, goto end; } - spl_parse_image_header(header); + err = spl_parse_image_header(header); + if (err < 0) { + puts("spl: ext4fs_read failed\n"); + goto end; + } err = ext4fs_read((char *)spl_image.load_addr, filelen, &actlen); |