projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e624a7
)
parse RedBoot environments as well (patch by Jonas <jmajau@ubnt.com>)
author
Gabor Juhos
<juhosg@openwrt.org>
Tue, 3 Feb 2009 08:44:50 +0000
(08:44 +0000)
committer
Gabor Juhos
<juhosg@openwrt.org>
Tue, 3 Feb 2009 08:44:50 +0000
(08:44 +0000)
SVN-Revision: 14384
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
patch
|
blob
|
history
diff --git
a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index 5402e0a54389ace0337ca3e11a1428a7fbf60a90..29c6c97cc634a5b8f6336c26092abc22cc7e9e04 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@
-115,10
+115,16
@@
static __init char *ar71xx_prom_getenv(const char *envname)
if (!is_valid_ram_addr(ar71xx_prom_envp))
return NULL;
- for (env = ar71xx_prom_envp; is_valid_ram_addr(*env); env++)
+ for (env = ar71xx_prom_envp; is_valid_ram_addr(*env); env++)
{
if (strncmp(envname, *env, len) == 0 && (*env)[len] == '=')
return *env + len + 1;
+ /* RedBoot env comes in pointer pairs - key, value */
+ if (strncmp(envname, *env, len) == 0 && (*env)[len] == 0)
+ if (is_valid_ram_addr(*(++env)))
+ return *env;
+ }
+
return NULL;
}