Re: [U-Boot] [new uImage] Cleanup cmd_bootm.c

2008-08-19 Thread Wolfgang Denk
Dear Marian,

in commit 1ee1180b you added code to common/cmd_bootm.c which uses the
env_get_char() function. By then, this went through unnoticed.

I'm sorry, but env_get_char() is a function that is internal  to  the
environment  handling  code.  It  is  not  supposed to be exported to
arbitrary  code.  Please  do  not  make  any  assumptions  about  the
internals of how the environment is stored.

Could you please provide a cleanup patch?

Thanks in advance.

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: [EMAIL PROTECTED]
"There's only one way to have a happy marriage and as soon as I learn
what it is I'll get married again."  - Clint Eastwood
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [new uImage] Cleanup cmd_bootm.c

2008-08-19 Thread Kumar Gala

On Aug 19, 2008, at 10:10 AM, Wolfgang Denk wrote:

> Dear Marian,
>
> in commit 1ee1180b you added code to common/cmd_bootm.c which uses the
> env_get_char() function. By then, this went through unnoticed.
>
> I'm sorry, but env_get_char() is a function that is internal  to  the
> environment  handling  code.  It  is  not  supposed to be exported to
> arbitrary  code.  Please  do  not  make  any  assumptions  about  the
> internals of how the environment is stored.
>
> Could you please provide a cleanup patch?

This wasn't Marian's doing.  The ARTOS support was added back in 2003  
(commit 7f70e853):

 * Patch by Pantelis Antoniou, 21 Apr 2003:
   add boot support for ARTOS (a proprietary OS)

How does one access the environment?  The only API we seem to have  
getenv, getenv_r, setenv and envmatch().  I'd argue that envmatch  
should be removed from common.h as it exposes the internals of how the  
env it stored.

There aren't any APIs to walk over all environment variables or to get  
a list of all of them.

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot