summaryrefslogtreecommitdiffstats
path: root/common/image.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-11-25 19:09:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-29 20:55:50 +0100
commitac4854be5e67b4d19884fb4462982d91ca9bc815 (patch)
tree13c49579edc3ab7edeafcfae7c97433255d7a6ca /common/image.c
parent88611e7448842749ccdd7193f4e0fc4d0a2bbe6c (diff)
downloadbarebox-ac4854be5e67b4d19884fb4462982d91ca9bc815.tar.gz
barebox-ac4854be5e67b4d19884fb4462982d91ca9bc815.tar.xz
factor out iminfo command
The rests of U-Boots iminfo command are sitting in commands/bootm.c and are in a nonusable state. Factor it out to its own file and make it work again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c
index 4a6402d8b9..939fe4b75d 100644
--- a/common/image.c
+++ b/common/image.c
@@ -290,7 +290,7 @@ void image_print_contents(const image_header_t *hdr, void *data)
printf ("%sEntry Point: %08x\n", p, image_get_ep(hdr));
type = image_get_type(hdr);
- if (type == IH_TYPE_MULTI || type == IH_TYPE_SCRIPT) {
+ if (data && (type == IH_TYPE_MULTI || type == IH_TYPE_SCRIPT)) {
int i;
ulong img_data, len;
ulong count = image_multi_count(data);