diff options
Diffstat (limited to 'tools/imagetool.c')
-rw-r--r-- | tools/imagetool.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/imagetool.c b/tools/imagetool.c index f14ca2fb979..87eee4ad04e 100644 --- a/tools/imagetool.c +++ b/tools/imagetool.c @@ -49,6 +49,12 @@ int imagetool_verify_print_header( return imagetool_verify_print_header_by_type(ptr, sbuf, tparams, params); for (curr = start; curr != end; curr++) { + /* + * Basically every data file can be guessed / verified as gpimage, + * so skip autodetection of data file as gpimage as it does not work. + */ + if ((*curr)->check_image_type && (*curr)->check_image_type(IH_TYPE_GPIMAGE) == 0) + continue; if ((*curr)->verify_header) { retval = (*curr)->verify_header((unsigned char *)ptr, sbuf->st_size, params); @@ -71,6 +77,11 @@ int imagetool_verify_print_header( } } + if (retval != 0) { + fprintf(stderr, "%s: cannot detect image type\n", + params->cmdname); + } + return retval; } @@ -105,7 +116,7 @@ static int imagetool_verify_print_header_by_type( } } else { - fprintf(stderr, "%s: print_header undefined for %s\n", + fprintf(stderr, "%s: verify_header undefined for %s\n", params->cmdname, tparams->name); } |