[U-Boot] hashtable lib and escaping
Mats Kärrman
Mats.Karrman at tritech.se
Mon Nov 5 14:34:52 CET 2012
Thanks for your advice.
I did not say so, but I'm primarily relying on the default environment and not so much the command line. I see now how to make this work by providing the necessary amount of backslash'es. Maybe it was your statement:
> THis syntax has never been correct. If it ever worked, than only by
> chance (read: because of incorrect/imperfect code).
that set me off wrong, because in 2009.03 (before the introduction of hashtable) it did work and there were no confusing parsing of escapes.
Still the parsing I see now is not exactly user friendly, example (U-Boot 2012.07):
=> setenv foo echo part one\\\;echo part two
=> print foo
foo=echo part one\\;echo part two
=> run foo
part one\;echo part two
=> printenv foo
foo=echo part one\\;echo part two
=> printenv
<snip>
foo=echo part one\\\\;echo part two
<snip>
here the run and print commands yields the expected result based on the setenv but not "printenv" alone, and my results does not match your example which were
> => setenv foo echo part one\\\;echo part two ; print foo ; run foo
> foo=echo part one\;echo part two
> part one;echo part two
Best Regards,
Mats
More information about the U-Boot
mailing list