fix: doimage: fixed 'header only' mode
- Before, running doimage with header only mode('-H 3' flag) always returned
error, even though there was no error, due to wrong initial value
to the error variable 'err'.
Also, Success message wasn't printed for header only mode.
- Fixed initial value to 'err' varible (from 1 to 0)
- Added success message to appear in header only mode.
Change-Id: If3607e6187d95fe2ad8c6b477ff2f76244088058
Signed-off-by: Bassel Saba <basselsa@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/23299
Reviewed-by: Omri Itach <omrii@marvell.com>
Tested-by: Omri Itach <omrii@marvell.com>
(cherry picked from commit 2c75a6ef0349ba620c763148becded1dd971facc)
Reviewed-on: http://vgitil04.il.marvell.com:8080/23656
Tested-by: Star_Automation <star@marvell.com>
diff --git a/tools/marvell/doimage_mv/doimage.c b/tools/marvell/doimage_mv/doimage.c
index 99861a9..e376807 100644
--- a/tools/marvell/doimage_mv/doimage.c
+++ b/tools/marvell/doimage_mv/doimage.c
@@ -1481,7 +1481,7 @@
int i;
int override[2];
char *buf_in = NULL;
- int err = 1;
+ int err = 0;
/* check if the output image exist */
printf(" ");
@@ -1641,10 +1641,8 @@
fprintf(stderr, "Error writing %s file \n", opt->fname.out);
goto end;
}
-
- fprintf(stdout, "====>>>> %s was created\n", opt->fname_arr[IMG_FILE_INDX]);
-
} /* if (opt->header_mode != HDR_ONLY) */
+ fprintf(stdout, "====>>>> %s was created\n", opt->fname_arr[IMG_FILE_INDX]);
end:
/* close handles */