summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-02-08 15:29:01 +0000
committerwdenk <wdenk>2005-02-08 15:29:01 +0000
commitb9649854f6ffdeaad23daec21013552cef2e05f0 (patch)
tree9d2992bb2b13a026208cc03110e24a68400fa20f /common
parente799d3755e83c70bf8c92977190d1777b390a8de (diff)
downloadu-boot-b9649854f6ffdeaad23daec21013552cef2e05f0.tar.gz
u-boot-b9649854f6ffdeaad23daec21013552cef2e05f0.tar.bz2
u-boot-b9649854f6ffdeaad23daec21013552cef2e05f0.zip
Fix yet another recently introduced bug.
Diffstat (limited to 'common')
-rw-r--r--common/cmd_ide.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 915ee76361..1cc88e3e50 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -450,11 +450,12 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
checksum = ntohl(hdr->ih_hcrc);
hdr->ih_hcrc = 0;
- if (crc32 (0, (char *)&hdr, sizeof(image_header_t)) != checksum) {
+ if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
puts ("\n** Bad Header Checksum **\n");
SHOW_BOOT_PROGRESS (-2);
return 1;
}
+ hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr);