[PATCH v3 1/4] parameter: allow setting of string parameters of zero length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
 lib/parameter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/parameter.c b/lib/parameter.c
index 865ad9f4316f..09559b637ee3 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -225,7 +225,7 @@ static int param_string_set(struct device_d *dev, struct param_d *p, const char
 	char *value_save = *ps->value;
 
 	if (!val)
-		return -EINVAL;
+		val = "";
 
 	*ps->value = xstrdup(val);
 
-- 
2.1.4


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux