[U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars

Wolfgang Denk wd at denx.de
Tue Nov 8 12:46:34 CET 2011


Dear Gerlando Falauto,

In message <4EB8F762.1030508 at keymile.com> you wrote:
>
> I tested "env import" with and without -n. Same for "env default".
> Also tested special variables.
> 
>  > For me, env import is broken now.
> 
> I am not able to see how it's obviously broken.

It just didn't work for me.

> Perhaps you mean that when you don't provide an argument to -n, the 
> following argument (e.g., -t) is interpreted as a variable name (and 
> therefore consumed)? That doesn't look like an error to me.

Yes, this is a serious bug. Aor design problem.

The whole interface is wrong. I have just extendend "env export" to
do a similar thing. The new syntax is:

         env export [-t | -b | -c] [-s size] addr [var ...]

We should do exactly the same for "env
import", i. e. make the size parameter an option to be passed with
"-s size", and pass the names of any variables to import as additional
arguments:

	env import [-t | -b | -c] [-s size] addr [var ...]

This also greatly simplifies the implementation.

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
Fools ignore complexity. Pragmatists suffer it. Some  can  avoid  it.
Geniuses remove it.
     - Perlis's Programming Proverb #58, SIGPLAN Notices, Sept.  1982


More information about the U-Boot mailing list