[PATCH v2] imd: provide dummy imd_command_setenv

Lucas Stach l.stach at pengutronix.de
Mon Feb 9 05:14:15 PST 2015


Ping. :)

Am Mittwoch, den 17.12.2014, 11:58 +0100 schrieb Lucas Stach:
> If CONFIG_CMD_IMD is not set there is no imd_command_setenv in the
> barebox binary that can be linked to. Although the whole imd infrastructure
> will be removed by the linker later in the build process as soon as it
> figures out that nothing inside barebox is using it, we still have to
> provide a dummy function to keep the build going.
> 
> Fixes:
> In function `imd_command': undefined reference to `imd_command_setenv'
> 
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> v2: move dummy to correct location
> ---
>  common/imd.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/common/imd.c b/common/imd.c
> index 2c837d6f256e..f84e34473e69 100644
> --- a/common/imd.c
> +++ b/common/imd.c
> @@ -22,6 +22,13 @@
>  #include <getopt.h>
>  #include <malloc.h>
>  #include <fs.h>
> +
> +#ifndef CONFIG_CMD_IMD
> +int imd_command_setenv(const char *variable_name, const char *value)
> +{
> +	return -ENOSYS;
> +}
> +#endif
>  #endif
>  
>  /*

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |




More information about the barebox mailing list