[U-Boot] [PATCH] common: add a grepenv command

Wolfgang Denk wd at denx.de
Fri Jul 16 12:55:42 CEST 2010


Dear "Reinhard Meyer (-VC)",

In message <4C403472.3070907 at emk-elektronik.de> you wrote:
>
> >> The grepenv command this patch adds can be used in lieu of printenv
> >> to facilitate searching.  grepenv works like printenv but limits its output
> >> only to environment strings (variable name and value pairs) that match the
> >> user specified substring.
> 
> My five cents to this: this addition command should be optional (#ifdef) anyway...

Agreed...

> > I'm in the process of resturcturing the whole environment handling.
> > The new implementation will use a hash table for internal storage, so
> > this code would no longer apply then.
> > 
> > Please wait a bit for me to publish the new code, and then try to
> > reimplement it in the new environment.
> 
> Will be there a means to mark variables as non-saveable, example if one
> does a bootp/dhcp and a saveenv afterwards, ip-address, filesize etc.
> are saved as well, which makes absolutely no sense. Neither does
> saving the ethaddr when it is created from VPD data :)

No, this is not part of my current work yet. However, once the hash
table based code is in place and working, it should be pretty
straightforward to extend the "struct entry", which currently holds
only two fields for name and value, by one or more additional fields
that can be used to store flags holding for example information like
what you mentioned.

But this is step 2 - at best.

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
"Whoever undertakes to set himself up as a judge of Truth  and  Know-
ledge is shipwrecked by the laughter of the gods."  - Albert Einstein


More information about the U-Boot mailing list