FIS: repare incorrect return value with ramdisk handling
Microblaze and PowerPC use boot_get_ramdisk for loading ramdisk to memory with checking return value. Return 0 means success. Return 1 means failed. Here is correspond part of code from bootm.c which check return code. ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_PPC, &rd_data_start, &rd_data_end); if (ret) goto error; Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
84a2c64a26
commit
c78fce699c
|
@ -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);
|
cfg_noffset = fit_conf_get_node (fit_hdr, fit_uname_config);
|
||||||
if (cfg_noffset < 0) {
|
if (cfg_noffset < 0) {
|
||||||
debug ("* ramdisk: no such config\n");
|
debug ("* ramdisk: no such config\n");
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset);
|
rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset);
|
||||||
if (rd_noffset < 0) {
|
if (rd_noffset < 0) {
|
||||||
debug ("* ramdisk: no ramdisk in config\n");
|
debug ("* ramdisk: no ramdisk in config\n");
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -872,7 +872,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
|
||||||
if (!fit_check_format (fit_hdr)) {
|
if (!fit_check_format (fit_hdr)) {
|
||||||
puts ("Bad FIT ramdisk image format!\n");
|
puts ("Bad FIT ramdisk image format!\n");
|
||||||
show_boot_progress (-120);
|
show_boot_progress (-120);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
show_boot_progress (121);
|
show_boot_progress (121);
|
||||||
|
|
||||||
|
@ -887,7 +887,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
|
||||||
if (cfg_noffset < 0) {
|
if (cfg_noffset < 0) {
|
||||||
puts ("Could not find configuration node\n");
|
puts ("Could not find configuration node\n");
|
||||||
show_boot_progress (-122);
|
show_boot_progress (-122);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
fit_uname_config = fdt_get_name (fit_hdr, cfg_noffset, NULL);
|
fit_uname_config = fdt_get_name (fit_hdr, cfg_noffset, NULL);
|
||||||
printf (" Using '%s' configuration\n", fit_uname_config);
|
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) {
|
if (rd_noffset < 0) {
|
||||||
puts ("Could not find subimage node\n");
|
puts ("Could not find subimage node\n");
|
||||||
show_boot_progress (-124);
|
show_boot_progress (-124);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf (" Trying '%s' ramdisk subimage\n", fit_uname_ramdisk);
|
printf (" Trying '%s' ramdisk subimage\n", fit_uname_ramdisk);
|
||||||
|
|
||||||
show_boot_progress (125);
|
show_boot_progress (125);
|
||||||
if (!fit_check_ramdisk (fit_hdr, rd_noffset, arch, images->verify))
|
if (!fit_check_ramdisk (fit_hdr, rd_noffset, arch, images->verify))
|
||||||
return 0;
|
return 1;
|
||||||
|
|
||||||
/* get ramdisk image data address and length */
|
/* get ramdisk image data address and length */
|
||||||
if (fit_image_get_data (fit_hdr, rd_noffset, &data, &size)) {
|
if (fit_image_get_data (fit_hdr, rd_noffset, &data, &size)) {
|
||||||
puts ("Could not find ramdisk subimage data!\n");
|
puts ("Could not find ramdisk subimage data!\n");
|
||||||
show_boot_progress (-127);
|
show_boot_progress (-127);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
show_boot_progress (128);
|
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)) {
|
if (fit_image_get_load (fit_hdr, rd_noffset, &rd_load)) {
|
||||||
puts ("Can't get ramdisk subimage load address!\n");
|
puts ("Can't get ramdisk subimage load address!\n");
|
||||||
show_boot_progress (-129);
|
show_boot_progress (-129);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
show_boot_progress (129);
|
show_boot_progress (129);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue