Currently we return NULL for unset parameters. As we can't set them back to NULL once set this is not very consistent. Return an empty string instead. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- lib/parameter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parameter.c b/lib/parameter.c index baf7720..c75c21e 100644 --- a/lib/parameter.c +++ b/lib/parameter.c @@ -135,7 +135,7 @@ int dev_param_set_generic(struct device_d *dev, struct param_d *p, static const char *param_get_generic(struct device_d *dev, struct param_d *p) { - return p->value; + return p->value ? p->value : ""; } static struct param_d *__dev_add_param(struct device_d *dev, const char *name, -- 1.7.10 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox