summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-13 08:27:35 -0400
committerTom Rini <trini@konsulko.com>2019-04-13 08:27:35 -0400
commitcf5eebeb18f7790d5030eb94f51fca0ebcd6e406 (patch)
treef4c9c40f9353fbe4104875779c7eedd3ed2342cc /tools
parent0a5228be868622894a5f8f226203cd7bac562187 (diff)
parent73c02e5e4fc1ef53d06289232edd6cc52e3d73f6 (diff)
Merge tag 'pull-12apr19' of git://git.denx.de/u-boot-dm
fdtdec tests and improvements for carve-outs pinctrl race-condition fix various other fixes in sandbox, sound, mkimage, etc.
Diffstat (limited to 'tools')
-rw-r--r--tools/mkimage.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 2899adff81..d1e1a6743d 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -403,14 +403,21 @@ int main(int argc, char **argv)
exit (EXIT_FAILURE);
}
- /*
- * scan through mkimage registry for all supported image types
- * and verify the input image file header for match
- * Print the image information for matched image type
- * Returns the error code if not matched
- */
- retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
- tparams, &params);
+ if (params.fflag) {
+ /*
+ * Verifies the header format based on the expected header for image
+ * type in tparams
+ */
+ retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
+ tparams, &params);
+ } else {
+ /**
+ * When listing the image, we are not given the image type. Simply check all
+ * image types to find one that matches our header
+ */
+ retval = imagetool_verify_print_header(ptr, &sbuf,
+ tparams, &params);
+ }
(void) munmap((void *)ptr, sbuf.st_size);
(void) close (ifd);