/* returns: zero in case of success or a negative value if fail.  */
static int fit_image_extract(const void *fit, int image_noffset, const char *file_name)
/* returns: zero in case of success or a negative value if fail.  */
static int fit_image_extract(const void *fit, int image_noffset, const char *file_name)
{
	const void *file_data;
	size_t file_size = 0;
	fit_image_get_data(fit, image_noffset, &file_data, &file_size);
	return imagetool_save_subimage(file_name, (ulong) file_data, file_size);
}