/* @locations: An array of supported splash locations. @size: Size of splash_locations array. */
static struct splash_location* select_splash_location(struct splash_location *locations, uint size)
/* @locations: An array of supported splash locations. @size: Size of splash_locations array. */
static struct splash_location* select_splash_location(struct splash_location *locations, uint size)
{
	int i;
	char *env_splashsource;
	if (!locations || size == 0)
		return NULL;
	env_splashsource = env_get("splashsource");
	if (env_splashsource == NULL)
		return &locations[0];
	for (i = 0; i < size; i++) {
		if (!strcmp(locations[i].name, env_splashsource))
			return &locations[i];
	}
	printf("splashsource env variable set to unsupported value\n");
	return NULL;
}