[U-Boot] U-boot env variables parsing

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Apr 1 19:13:23 CEST 2010


Detlev Zundel <dzu at denx.de> wrote on 2010-04-01 16:56:40:
>
> Hi Jocke,
>
> >> > > Hm... will this not make escaping impossible? Assume you want to pass
> >> > >
> >> > >    arg=${name}
> >> > >
> >> > > to Linux. How would you escape this so it does NOT get expanded if
> >> > > you run process_macros() arbitrarily often?
> >> >
> >> > Possibly, I never needed that though.
> >> > One would probably need to add an escape char for that. Something
> >> > like arg=\${name}
> >>
> >> Woudn't this then just cause another cycle through process_macros(),
> >> where it then gets substitured anyway? [Guess I gotta try this out.]
> >
> > I am not sure what will happen, it was so man years ago.
> > But I would guess that if you really want to pass arg=$(name)
> > to the kernel you will probably need to do some adjustment.
>
> To me it looks like the new code would indeed do a "greedy" substitution
> only stopping when no more substitutions can be done.  This is very
> un-unixy and thus not something I'd like to see as a default behaviour.

Why not? What is gained by the current method?

 Jocke



More information about the U-Boot mailing list