parameter: strip leading and trailing whitespaces
My initial bug was the following: I set the
global.boot.default="boot1 boot2 " and executed the 'boot' command. If
both targets are not bootable barebox starts to execute the boot scripts
found under /env/boot. This is because of the command/boot.c
implementation and the leading whitespace. Without the whitespace only
the two desired boot targets are tried.

IMHO leading and trailing whitespaces are error-prone in many cases. If
someone wants to concatenate strings he/she should add spaces on
purpose. So I fixed the bug above globally by always stripping leading
and trailing whitespaces.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 5c06691 commit 3b81d1199347b2fd250d72bb4df39e15f975b6ed
@Marco Felsch Marco Felsch authored on 30 Oct 2019
Sascha Hauer committed on 4 Nov 2019
Showing 1 changed file
View
lib/parameter.c