summaryrefslogtreecommitdiff
path: root/common/cmd_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_scsi.c')
-rw-r--r--common/cmd_scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 062b1c9..61309f9 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -269,7 +269,7 @@ int do_scsiboot (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;
}
@@ -283,7 +283,7 @@ int do_scsiboot (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;