mirror of
https://xff.cz/git/u-boot/
synced 2025-10-26 16:13:55 +01:00
Fix byteorder problem in usbboot and scsiboot commands.
This commit is contained in:
@@ -387,7 +387,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
|
||||
hdr = (image_header_t *)addr;
|
||||
|
||||
if (hdr->ih_magic != IH_MAGIC) {
|
||||
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
|
||||
printf("\n** Bad Magic Number **\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -402,7 +402,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
|
||||
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;
|
||||
cnt -= 1;
|
||||
|
||||
Reference in New Issue
Block a user