From c66af9fe057e953a9ed2458e0878cca74a74a521 Mon Sep 17 00:00:00 2001 From: Juergen Beisert Date: Fri, 14 Oct 2011 14:11:28 +0200 Subject: 'bootz' command fails to load the zImage's header Running the 'bootz' command always fails with could not read due to it loads only a size of a pointer, instead of the size of the expected header structure. Signed-off-by: Juergen Beisert Signed-off-by: Sascha Hauer --- arch/arm/lib/bootz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') 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; -- cgit v1.2.3