
15 Jan
2014
15 Jan
'14
6:40 p.m.
On 01/15/2014 03:53 AM, Hector Palacios wrote:
Since function mmc_get_env_devno is __weak and can be overridden by board code, boards do not necessarily need to define CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, return 0 by default.
Ah, I see that's a better justification for allowing the define not to be set.
diff --git a/common/env_mmc.c b/common/env_mmc.c
__weak int mmc_get_env_devno(void) { +#ifdef CONFIG_SYS_MMC_ENV_DEV return CONFIG_SYS_MMC_ENV_DEV; +#endif
Same comment here; need a #else here, and #endif below.
- return 0;
+}
Re: Hector's comments: Perhaps the following in include/config_fallbacks.h would be appropriate?
#ifndef CONFIG_SYS_MMC_ENV_DEV #define CONFIG_SYS_MMC_ENV_DEV 0 #endif
?