tools/env: allow equal sign as key value separation
authorStefan Agner <stefan.agner@toradex.com>
Thu, 1 Mar 2018 13:06:32 +0000 (14:06 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 5 Mar 2018 15:05:36 +0000 (10:05 -0500)
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

index 6b71acb28fe1c47451e84e80ef31bb5fd7867436..0e3e34321f6467b9889295aaf9b46b3bee158e57 100644 (file)
@@ -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;