summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-02-04 21:33:05 +0000
committerwdenk <wdenk>2005-02-04 21:33:05 +0000
commit2f916943c9b85d628c67c8ac98e604f2bcbc21e4 (patch)
treed61a477a82df2d093a137c87779d581b5a1aa4ef /common
parentf8883cb101061c85c49cc1a3e68b890eab8ab118 (diff)
Fix for incomplete byteorder fix in cmd_scsi.c and cmd_usb.c
Diffstat (limited to 'common')
-rw-r--r--common/cmd_scsi.c1
-rw-r--r--common/cmd_usb.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 61309f90a44..68e46b63897 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -281,6 +281,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("\n** Bad Header Checksum **\n");
return 1;
}
+ hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr);
cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t));
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index c6b5d140aca..0bf050b14df 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -309,7 +309,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
char *boot_device = NULL;
char *ep;
- int dev, part=0, rcode;
+ int dev, part=1, rcode;
ulong addr, cnt, checksum;
disk_partition_t info;
image_header_t *hdr;
@@ -399,6 +399,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("\n** Bad Header Checksum **\n");
return 1;
}
+ hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr);