Files
Eduardo Mucelli Rezende Oliveira 381b391bfa bootconfig: Trim unquoted values at end of file
__xbc_parse_value() trims an unquoted value when it encounters a
delimiter, but leaves trailing whitespace intact when it reaches the end
of the input. Thus "key = value   " has a different value depending on
whether the file ends with a newline. The extra whitespace also reaches
the rendered kernel command line.

Trim unquoted values after the scan finishes, including at end of input.
Skip trimming after a closing quote so intentional whitespace in quoted
values remains unchanged. Add checks for scalars, arrays and quoted
values without a final newline.

Link: https://lore.kernel.org/all/31f248f330e716b925add3a0ba76f62826527312.1794337724.git.edumucelli@gmail.com/

Fixes: 76db5a27a8 ("bootconfig: Add Extra Boot Config support")
Cc: [email protected]
Signed-off-by: Eduardo Mucelli Rezende Oliveira <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 14:15:27 +09:00
..