[U-Boot] hashtable lib and escaping

Wolfgang Denk wd at denx.de
Mon Nov 5 19:33:50 CET 2012


Dear Mats Kärrman,

In message <ED3E0BCACD909541BA94A34C4A164D4C425D1384 at post.tritech.se> you wrote:
>
> that set me off wrong, because in 2009.03 (before the introduction of hasht
> able) it did work and there were no confusing parsing of escapes.

That's not true.  AFAICT, quoting resp. escape rules haven't changed
at all, with a single exception: the old code did not support
multi-line variables, i. e. variables containing newline characters.

> Still the parsing I see now is not exactly user friendly, example (U-Boot 2
> 012.07):
> 
>     => setenv foo echo part one\\\;echo part two
>     => print foo
>     foo=echo part one\\;echo part two

This is not what I'm seeing.

> here the run and print commands yields the expected result based on the set
> env 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

Any chance that you are not using the hush shell, but the old, simple
command interpreter?

I don't think this has seen much (if any) testing lately, so it is well
possible that there are bugs there...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Computers are not intelligent. They only think they are.


More information about the U-Boot mailing list