fdt: Fix FIT header verification in mkimage and conduct same checks as bootm
FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.
Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.
checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.
Signed-off-by: Jordan Hand <jorhand@microsoft.com>
diff --git a/tools/mkimage.c b/tools/mkimage.c
index ea5ed54..2899adf 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -409,7 +409,7 @@
* Print the image information for matched image type
* Returns the error code if not matched
*/
- retval = imagetool_verify_print_header(ptr, &sbuf,
+ retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
tparams, ¶ms);
(void) munmap((void *)ptr, sbuf.st_size);