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

Fix byteorder problem in usbboot and scsiboot commands.

parent 20a80418
Branches
Tags
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Changes for U-Boot 1.1.3: Changes for U-Boot 1.1.3:
====================================================================== ======================================================================
* Fix byteorder problem in usbboot and scsiboot commands.
* Patch by Cajus Hahn, 04 Feb 2005: * Patch by Cajus Hahn, 04 Feb 2005:
- don't insist on leading '/' for filename in ext2load - don't insist on leading '/' for filename in ext2load
- set default partition to useful value (1) in ext2load - set default partition to useful value (1) in ext2load
......
...@@ -269,7 +269,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -269,7 +269,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
hdr = (image_header_t *)addr; hdr = (image_header_t *)addr;
if (hdr->ih_magic == IH_MAGIC) { if (ntohl(hdr->ih_magic) == IH_MAGIC) {
printf("\n** Bad Magic Number **\n"); printf("\n** Bad Magic Number **\n");
return 1; return 1;
} }
...@@ -283,7 +283,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -283,7 +283,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
} }
print_image_hdr (hdr); print_image_hdr (hdr);
cnt = (hdr->ih_size + sizeof(image_header_t)); cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t));
cnt += info.blksz - 1; cnt += info.blksz - 1;
cnt /= info.blksz; cnt /= info.blksz;
cnt -= 1; cnt -= 1;
......
...@@ -387,7 +387,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -387,7 +387,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
hdr = (image_header_t *)addr; hdr = (image_header_t *)addr;
if (hdr->ih_magic != IH_MAGIC) { if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf("\n** Bad Magic Number **\n"); printf("\n** Bad Magic Number **\n");
return 1; return 1;
} }
...@@ -402,7 +402,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -402,7 +402,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_image_hdr (hdr); print_image_hdr (hdr);
cnt = (hdr->ih_size + sizeof(image_header_t)); cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t));
cnt += info.blksz - 1; cnt += info.blksz - 1;
cnt /= info.blksz; cnt /= info.blksz;
cnt -= 1; cnt -= 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment