/* Call generate_mtdparts to process all devices and generate corresponding mtdparts string, save it in mtdparts environment variable. */
static int generate_mtdparts_save(char *buf, u32 buflen)
/* Call generate_mtdparts to process all devices and generate corresponding mtdparts string, save it in mtdparts environment variable. */
static int generate_mtdparts_save(char *buf, u32 buflen)
{
	int ret;
	ret = generate_mtdparts(buf, buflen);
	if ((buf[0] != '\0') && (ret == 0))
		setenv("mtdparts", buf);
	else
		setenv("mtdparts", NULL);
	return ret;
}