/* The mtdparts variable tends to be long. If we need to access it before the env is relocated, then we need to use our own stack buffer. gd->env_buf will be too small. */
static const char* env_get_mtdparts(char *buf)
/* The mtdparts variable tends to be long. If we need to access it before the env is relocated, then we need to use our own stack buffer. gd->env_buf will be too small. */
static const char* env_get_mtdparts(char *buf)
{
	if (gd->flags & GD_FLG_ENV_READY)
		return env_get("mtdparts");
	if (env_get_f("mtdparts", buf, MTDPARTS_MAXLEN) != -1)
		return buf;
	return NULL;
}