
6 Dec
2016
6 Dec
'16
10:22 a.m.
Hi Kosta,
On 06.12.2016 10:06, Kostya Porotchkin wrote:
<snip>
+int is_mmc_active(void) +{
- return 1;
+} +#else /* CONFIG_DM_MMC */ +#define mmc_burn_image 0 +#define mmc_read_file 0 +#define is_mmc_active 0 +#endif /* CONFIG_DM_MMC */
Please use empty functions instead.
[Konstantin Porotchkin] Do you mean defining it in this way? #define mmc_burn_image(a) 0 Or like below? int mmc_burn_image(size_t image_size) { return -1; }
The latter please. Perhaps its also possible to return some decent error code in this case (ENODEV?) so that the calling code can handle this case even better or report this clearer to the user.
Thanks, Stefan