diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-31 10:05:29 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-31 10:05:29 +0000 |
commit | 48bf9ccb332b5c7b8c5983d5c0ac4a2fce2c10cf (patch) | |
tree | 525503736c03234774d1343c7646f4ac25c08fe7 /target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch | |
parent | ee0a2580d0c45e18fd53b281f2524efe48a13cf5 (diff) |
brcm47xx: some fixes
* fix return codes of nvram_getenv. Now it behaves like cfe_getenv.
* also check cfe for kernel_args param.
* some style fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22424 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch b/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch new file mode 100644 index 000000000..161cd61d8 --- /dev/null +++ b/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-nvram_getenv-fix-return-value.patch @@ -0,0 +1,33 @@ +From c5cb2459ff124c1a928e2056bc1fe2da7b6ab6ba Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Fri, 30 Jul 2010 17:45:20 +0200 +Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value. + +nvram_getenv should behave like cfe_getenv. For now it is used like +cfe_getenv. cfe_getenv returns 0 on success and -1 in case of an error. +Change nvram_getenv to do the same. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + arch/mips/bcm47xx/nvram.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/mips/bcm47xx/nvram.c ++++ b/arch/mips/bcm47xx/nvram.c +@@ -69,7 +69,7 @@ int nvram_getenv(char *name, char *val, + char *var, *value, *end, *eq; + + if (!name) +- return 1; ++ return -8; + + if (!nvram_buf[0]) + early_nvram_init(); +@@ -89,6 +89,6 @@ int nvram_getenv(char *name, char *val, + return 0; + } + } +- return 1; ++ return -9; + } + EXPORT_SYMBOL(nvram_getenv); |