Commit 2e6697b2 authored by Bernhard Nortmann's avatar Bernhard Nortmann
Browse files

fexc: Default unquoted values to string type



Vendor-provided .fex files have repeatedly shown key-value pairs
(assignments) where the value is an identifier-style string *not*
surrounded by double quotes. The corresponding .bin files confirm
that such values end up as "string" type entries.

So far, our .fex parser has choked on these values. The commit
changes this behavior and treats them as strings now, to allow
processing 'original' .fex without adjustments.
Signed-off-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
parent 2a4af4f5
......@@ -348,7 +348,15 @@ int script_parse_fex(FILE *in, const char *filename, struct script *script)
continue;
}
} else {
goto invalid_char_at_p;
/* goto invalid_char_at_p; */
errf("Warning: %s:%zu: unquoted value '%s', assuming string\n",
filename, line, p);
if (script_string_entry_new(last_section, key, pe-p, p)) {
pr_debug("%s.%s = \"%s\"\n",
last_section->name, key, p);
continue;
}
perror("malloc");
}
errf("E: %s:%zu: parse error at %zu.\n",
filename, line, p-buffer+1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment