diff mbox series

[U-Boot] tools/env: allow equal sign as key value separation

Message ID 20180301130632.27997-1-stefan@agner.ch
State Accepted
Commit cd655514aa044c77fe3b895a51677ba47b26ba89
Delegated to: Tom Rini
Headers show
Series [U-Boot] tools/env: allow equal sign as key value separation | expand

Commit Message

Stefan Agner March 1, 2018, 1:06 p.m. UTC
From: Stefan Agner <stefan.agner@toradex.com>

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.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
 tools/env/fw_env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini March 5, 2018, 6:54 p.m. UTC | #1
On Thu, Mar 01, 2018 at 02:06:32PM +0100, Stefan Agner wrote:

> From: Stefan Agner <stefan.agner@toradex.com>
> 
> 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.
> 
> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index ca5507d4d7..ad9524b8ec 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -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;