summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2011-10-14 14:11:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-10-14 14:14:45 +0200
commitc66af9fe057e953a9ed2458e0878cca74a74a521 (patch)
tree74020542654e76cb501bf919d2ce3abc8f705eff
parent00928230056867bfd1914a29aed81c145fa26e37 (diff)
downloadbarebox-c66af9fe057e953a9ed2458e0878cca74a74a521.tar.gz
barebox-c66af9fe057e953a9ed2458e0878cca74a74a521.tar.xz
'bootz' command fails to load the zImage's header
Running the 'bootz' command always fails with could not read <some file> due to it loads only a size of a pointer, instead of the size of the expected header structure. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/lib/bootz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c
index fc14487bfa..9be615be2a 100644
--- a/arch/arm/lib/bootz.c
+++ b/arch/arm/lib/bootz.c
@@ -53,7 +53,7 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
if (!usemap) {
header = &__header;
- ret = read(fd, header, sizeof(header));
+ ret = read(fd, header, sizeof(*header));
if (ret < sizeof(*header)) {
printf("could not read %s\n", argv[1]);
goto err_out;