common: oftree: trim leading spaces from bootargs
When barebox concatenates all dynamic bootargs string for linux, if they
are empty, the resulting string might be composed of only spaces.
Currently, there is no check for such string and it leads to
overwriting bootargs in the device tree by an empty string. To avoid
this behavior, use skip_spaces to trim leading spaces and then check if
the string is empty. If so, simply returns and don't patch device tree
bootargs.

Signed-off-by: Clement Leger <cleger@kalray.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent ce70a15 commit 8fb804c55b8ddf8edbf73489ee062f7d437adcf6
@Clement Leger Clement Leger authored on 20 Mar 2020
Sascha Hauer committed on 23 Mar 2020
Showing 1 changed file
View
common/oftree.c