[U-Boot] U-boot env variables parsing

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Apr 8 19:49:53 CEST 2010


Detlev Zundel <dzu at denx.de> wrote on 2010-04-08 18:06:40:
>
> Hi Jocke,

Hi again :)

>
> [...]
>
> > Since an escape char appear to exist, one should be able to use it much like you
> > did above so I don't think that any use case disappears. Instead the common usage
> > becomes simpler and the so far artificial use case needs an extra escape char.
>
> Hm.  I have to admit that I did not actually try your code, but there is
> a loop in there until no further substitution takes place.  It seems to
> me that this loop over process_macros thus does substitution _and_ uses
> up the escape characters.

Possibly, I haven't tested that either but ...

>
> So I fear that if in one iteration _some_ substitution takes place and
> the escape character is stripped in the same iteration _another_ round
> of substitution will be done and the escape character is gone.  So in
> effect you will have to study the whole string in advance (plus all the
> substitutions it will see) to tell how many rounds the loop will take
> and how many escape characters will be needed.
>
> Such a behaviour would be very odd in my eyes.  On the other hand, this
> is only theory....

... I don't think you or WD has changed your mind even it it worked the
way we want it to so no point arguing over an impl. detail/bug when we
don't agree on the big picture.

This "feature" isn't that important to me so I rest my case.

  Jocke



More information about the U-Boot mailing list