diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_nvedit.c | 3 | ||||
-rw-r--r-- | common/cmd_onenand.c | 4 | ||||
-rw-r--r-- | common/env_onenand.c | 2 | ||||
-rw-r--r-- | common/image.c | 16 |
4 files changed, 13 insertions, 12 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 85a0f94..7089706 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -99,7 +99,8 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } } - printf("\nEnvironment size: %d/%d bytes\n", i, ENV_SIZE); + printf("\nEnvironment size: %d/%ld bytes\n", + i, (ulong)ENV_SIZE); return 0; } diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c index aff11d1..ce99a38 100644 --- a/common/cmd_onenand.c +++ b/common/cmd_onenand.c @@ -70,14 +70,14 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) if (!end || end < 0) end = start; - printf("Erase block from %d to %d\n", start, end); + printf("Erase block from %lu to %lu\n", start, end); for (block = start; block <= end; block++) { instr.addr = block << onenand_chip.erase_shift; instr.len = 1 << onenand_chip.erase_shift; ret = onenand_erase(&onenand_mtd, &instr); if (ret) { - printf("erase failed %d\n", block); + printf("erase failed %lu\n", block); break; } } diff --git a/common/env_onenand.c b/common/env_onenand.c index ac8a8c1..ad5b1d7 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -103,7 +103,7 @@ int saveenv(void) instr.addr = env_addr; instr.addr -= (unsigned long)onenand_chip.base; if (onenand_erase(&onenand_mtd, &instr)) { - printf("OneNAND: erase failed at 0x%08x\n", env_addr); + printf("OneNAND: erase failed at 0x%08lx\n", env_addr); return 1; } diff --git a/common/image.c b/common/image.c index ddd9e8b..535c302 100644 --- a/common/image.c +++ b/common/image.c @@ -827,13 +827,13 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, cfg_noffset = fit_conf_get_node (fit_hdr, fit_uname_config); if (cfg_noffset < 0) { debug ("* ramdisk: no such config\n"); - return 0; + return 1; } rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset); if (rd_noffset < 0) { debug ("* ramdisk: no ramdisk in config\n"); - return 0; + return 1; } } #endif @@ -872,7 +872,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, if (!fit_check_format (fit_hdr)) { puts ("Bad FIT ramdisk image format!\n"); show_boot_progress (-120); - return 0; + return 1; } show_boot_progress (121); @@ -887,7 +887,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, if (cfg_noffset < 0) { puts ("Could not find configuration node\n"); show_boot_progress (-122); - return 0; + return 1; } fit_uname_config = fdt_get_name (fit_hdr, cfg_noffset, NULL); printf (" Using '%s' configuration\n", fit_uname_config); @@ -902,20 +902,20 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, if (rd_noffset < 0) { puts ("Could not find subimage node\n"); show_boot_progress (-124); - return 0; + return 1; } printf (" Trying '%s' ramdisk subimage\n", fit_uname_ramdisk); show_boot_progress (125); if (!fit_check_ramdisk (fit_hdr, rd_noffset, arch, images->verify)) - return 0; + return 1; /* get ramdisk image data address and length */ if (fit_image_get_data (fit_hdr, rd_noffset, &data, &size)) { puts ("Could not find ramdisk subimage data!\n"); show_boot_progress (-127); - return 0; + return 1; } show_boot_progress (128); @@ -925,7 +925,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, if (fit_image_get_load (fit_hdr, rd_noffset, &rd_load)) { puts ("Can't get ramdisk subimage load address!\n"); show_boot_progress (-129); - return 0; + return 1; } show_boot_progress (129); |