[U-Boot] [PATCH] Make flash protection work, when the environment is in EEPROM
Jon Smirl
jonsmirl at gmail.com
Sat Mar 21 21:25:54 CET 2009
On Sat, Mar 21, 2009 at 4:24 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Jon Smirl,
>
> In message <9e4733910903211308v63878fabx19f3327371db56c6 at mail.gmail.com> you wrote:
>>
>> My guess is getenv() returns a pointer to the environment variable,
>> not a copy of the environment variable. getenv_r() returns a copy. How
>> can you return a pointer to the variable if the variable is in
>> something not directly addressable like EEPROM? Does
>
> The environment always gets copied to RAM. And it's a perfectly simple
> thing to return an adress pointing to some memory in RAM :-)
>
>> getenv("unlock"); do what you want when the environment is in EEPROM?
>
> getenv() always works that way, no matter which actual media is used
> for the persistent storage of the environment.
This one can be dropped. It looks like a misunderstanding in how the API worked.
>
> 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
> The only person who always got his work done by Friday
> was Robinson Crusoe.
>
--
Jon Smirl
jonsmirl at gmail.com
More information about the U-Boot
mailing list