mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] imd: provide dummy imd_command_setenv
@ 2014-12-17 10:58 Lucas Stach
  2015-02-09 13:14 ` Lucas Stach
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2014-12-17 10:58 UTC (permalink / raw)
  To: barebox

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@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
 
 /*
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] imd: provide dummy imd_command_setenv
  2014-12-17 10:58 [PATCH v2] imd: provide dummy imd_command_setenv Lucas Stach
@ 2015-02-09 13:14 ` Lucas Stach
  2015-02-10  9:39   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2015-02-09 13:14 UTC (permalink / raw)
  To: barebox

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@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/  |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] imd: provide dummy imd_command_setenv
  2015-02-09 13:14 ` Lucas Stach
@ 2015-02-10  9:39   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-02-10  9:39 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Mon, Feb 09, 2015 at 02:14:15PM +0100, Lucas Stach wrote:
> Ping. :)

Applied now.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-10  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 10:58 [PATCH v2] imd: provide dummy imd_command_setenv Lucas Stach
2015-02-09 13:14 ` Lucas Stach
2015-02-10  9:39   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox