From: Kumar Gala Date: Tue, 19 Aug 2008 10:23:54 -0500 Subject: [U-Boot] [PATCH v3] fdt: rework fdt_fixup_ethernet() to use env instead of bd_t In-Reply-To: <20080819150654.2C3D724899@gemini.denx.de> References: <20080819150654.2C3D724899@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Aug 19, 2008, at 10:06 AM, Wolfgang Denk wrote: > Dear Kumar Gala, > > In message > you wrote: >> >> --- a/common/fdt_support.c >> +++ b/common/fdt_support.c >> @@ -368,55 +368,96 @@ int fdt_fixup_memory(void *blob, u64 start, >> u64 size) > ... >> + /* walk the env looking for eth[.*]addr */ >> + for (i=0; env_get_char(i) != '\0'; i=nxt+1) { >> + for (nxt=i; env_get_char(nxt) != '\0'; ++nxt) >> + ; > > Please do not do this. 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. > > NAK. I'm so confused.. how does one 'iterate' over the environment than? As you agree with Scott's suggestion in: http://lists.denx.de/pipermail/u-boot/2008-August/000498.html - k