Hello All,
Commit c0559be371b2a64b1a817088c3308688e2182f93 introduces a bug in
the environment setting storage in U-boot-1.3.3-rc3.
Settings are retrieved from dataflash when only settings in RAM are
valid, resulting in corrupt environment settings, failing printenv
command, and
duplicate variables.
This patch fixes this by always using the RAM area when it is created
and initialized. (Matches more the behavior as it was prior to this
particular commit.)
See attached (Sorry, my mailer does not handle inline-patches properly)
Kind Regards,
Remy
Commit c0559be371b2a64b1a817088c3308688e2182f93 introduces a bug in the environment
setting storage. Settings are retrieved from dataflash when only settings in RAM
are valid, resulting in corrupt environment settings, failing printenv command, and
duplicate variables.
This patches fixes this by always using the RAM area when it is created and
initalised. (Matches more the behavior as it was prior to this particular commit.)
Signed-off-by: Remy Bohmer <[EMAIL PROTECTED]>
---
common/env_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: u-boot-git-05052008/common/env_common.c
===================================================================
--- u-boot-git-05052008.orig/common/env_common.c 2008-05-06 15:35:36.000000000 +0200
+++ u-boot-git-05052008/common/env_common.c 2008-05-06 15:40:58.000000000 +0200
@@ -185,8 +185,8 @@ uchar env_get_char (int index)
{
uchar c;
- /* if relocated to RAM */
- if (gd->flags & GD_FLG_RELOC)
+ /* if relocated to RAM, OR if the environment in Malloc-ed RAM is valid */
+ if ((gd->flags & GD_FLG_RELOC) || (gd->env_valid))
c = env_get_char_memory(index);
else
c = env_get_char_init(index);
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users