summaryrefslogtreecommitdiff
path: root/common/cmd_fdc.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-01-08 18:14:09 +0100
committerWolfgang Denk <wd@denx.de>2008-02-07 01:12:53 +0100
commitb97a2a0a21f279d66de8a9bdbfe21920968bcb1c (patch)
tree7746eae37d3a468f3471cd303156920637445350 /common/cmd_fdc.c
parented29bc4e8142b46b626f67524207b36e43d9aad6 (diff)
downloadu-boot-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.tar.gz
u-boot-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.tar.bz2
u-boot-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.zip
[new uImage] Define a API for image handling operations
- Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'common/cmd_fdc.c')
-rw-r--r--common/cmd_fdc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 7349412c77..3b8f80b64d 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -836,13 +836,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 1;
}
hdr = (image_header_t *)addr;
- if (ntohl(hdr->ih_magic) != IH_MAGIC) {
+ if (!image_get_magic (hdr)) {
printf ("Bad Magic Number\n");
return 1;
}
- print_image_hdr(hdr);
+ print_image_hdr (hdr);
- imsize= ntohl(hdr->ih_size)+sizeof(image_header_t);
+ imsize= image_get_image_size (hdr);
nrofblk=imsize/512;
if((imsize%512)>0)
nrofblk++;
@@ -861,7 +861,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* Loading ok, update default load address */
load_addr = addr;
- if(hdr->ih_type == IH_TYPE_KERNEL) {
+ if(image_check_type (hdr, IH_TYPE_KERNEL)) {
/* Check if we should attempt an auto-start */
if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
char *local_args[2];