]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_fdc.c
[new uImage] Rename and move print_image_hdr() routine
[karo-tx-uboot.git] / common / cmd_fdc.c
index 7349412c77a92af60fa8700f9f48e5a012fda8d5..c97abfb58ec7a23cb7d136f88498d943cde8d997 100644 (file)
@@ -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);
+       image_print_contents (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];