mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] parameter: allow setting of string parameters of zero length
Date: Mon, 15 Jun 2015 15:44:46 +0200	[thread overview]
Message-ID: <1434375887-16733-2-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1434375887-16733-1-git-send-email-mkl@pengutronix.de>

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-06-15 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 13:44 [PATCH 0/2] state: add support for fixed size strings Marc Kleine-Budde
2015-06-15 13:44 ` Marc Kleine-Budde [this message]
2015-06-15 13:44 ` [PATCH 2/2] state: add support for fixed length strings Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434375887-16733-2-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox