[U-Boot] [PATCH] mkimage: Fix 'Unknown OMAP image type - 5'

John Rigby john.rigby at linaro.org
Tue Aug 9 18:50:43 CEST 2011


>
>> Seems to me like init
>> functions are not / should not be dependent on order, so the "fix"
>> seems fragile to me, at least as long as we cannot add a good
>> explanation.
>
> Yes, I agree.
>
> John? Aneesh? Any idea?
>
The method check_image_type in image_type_params is supposed to just
return success or failure.  However, for omap it also calls fprintf:

static int omapimage_check_image_types(uint8_t type)
{
	if (type == IH_TYPE_OMAPIMAGE)
		return EXIT_SUCCESS;
	else {
		fprintf(stderr, "Unknown OMAP image type - %x", type);
		return EXIT_FAILURE;
	}
}

I just looked at all the other image checkers and no others have this
so the fix is to simply remove the fprintf.  I obviously did not
understand this when I wrote the original.

John


More information about the U-Boot mailing list