/* returns negative if input image format does not match with any of supported image types  */
int mkimage_verify_print_header(void *ptr, struct stat *sbuf)
/* returns negative if input image format does not match with any of supported image types  */
int mkimage_verify_print_header(void *ptr, struct stat *sbuf)
{
	int retval = -1;
	struct image_type_params *curr;
	for (curr = mkimage_tparams; curr != NULL; curr = curr->next ) {
		if (curr->verify_header) {
			retval = curr->verify_header (
				(unsigned char *)ptr, sbuf->st_size,
				&params);
			if (retval == 0) {
				if (curr->print_header)
					curr->print_header (ptr);
				else {
					fprintf (stderr,
					"%s: print_header undefined for %s\n",
					params.cmdname, curr->name);
				}
				break;
			}
		}
	}
	return retval;
}