9
0
Fork 0

'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>
This commit is contained in:
Juergen Beisert 2011-10-14 14:11:28 +02:00 committed by Sascha Hauer
parent 0092823005
commit c66af9fe05
1 changed files with 1 additions and 1 deletions

View File

@ -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;