Skip to content
Snippets Groups Projects
Commit 2f916943 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Fix for incomplete byteorder fix in cmd_scsi.c and cmd_usb.c

parent f8883cb1
No related branches found
No related tags found
No related merge requests found
...@@ -281,6 +281,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -281,6 +281,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("\n** Bad Header Checksum **\n"); puts ("\n** Bad Header Checksum **\n");
return 1; return 1;
} }
hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr); print_image_hdr (hdr);
cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t)); cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t));
......
...@@ -309,7 +309,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -309,7 +309,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{ {
char *boot_device = NULL; char *boot_device = NULL;
char *ep; char *ep;
int dev, part=0, rcode; int dev, part=1, rcode;
ulong addr, cnt, checksum; ulong addr, cnt, checksum;
disk_partition_t info; disk_partition_t info;
image_header_t *hdr; image_header_t *hdr;
...@@ -399,6 +399,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -399,6 +399,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("\n** Bad Header Checksum **\n"); puts ("\n** Bad Header Checksum **\n");
return 1; return 1;
} }
hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr); print_image_hdr (hdr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment