Skip to contentSkip to conversation

tools/env: allow equal sign as key value separation

PATCH In review Stefan Agner 2 participants 2 messages Mar 1, 2018 – Mar 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/env: allow equal sign as key value separation

From: Stefan Agner <[email protected]>

Treat the first equal sign as a key/value separation too. This makes the script files compatible with mkenvimage input file format. It won't support variables with equal signs anymore, but this seems not really like a loss.

---
 tools/env/fw_env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/env/fw_env.c +1 -1
index ca5507d4d7..ad9524b8ec 100644
@@ -357,7 +357,7 @@ static int get_config (char *);
 static char *skip_chars(char *s)
 {
 	for (; *s != '\0'; s++) {
-		if (isblank(*s))
+		if (isblank(*s) || *s == '=')
 			return s;
 	}
 	return NULL;
Signature · 1 line
2.16.2
#1 lore raw
Quoted 8 lines · Stefan Agner

From: Stefan Agner <[email protected]>

Treat the first equal sign as a key/value separation too. This makes the script files compatible with mkenvimage input file format. It won't support variables with equal signs anymore, but this seems not really like a loss.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180305/6b3f6a06/attachment.sig>