diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-18 23:08:26 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-18 23:08:26 +0000 |
commit | 035f06d698fda6b5864d9665c4f657215dbf1e3e (patch) | |
tree | 397b1a30db8f78e15b86821f7268ad2211b00a8a /target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch | |
parent | 7005c79799cf4dc2fd5c528dba2ae9940b04bf33 (diff) |
brcm47xx: sprom for nvram parsing
This adds support for parsing sprom form nvram for sprom version form 1 to 9.
It also adds sprom from nvram support for devices on the bcma bus.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30638 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch b/target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch new file mode 100644 index 000000000..926ec844c --- /dev/null +++ b/target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch @@ -0,0 +1,24 @@ +From 3ac18c5072e097ffa719994ef3b5c64e744a5405 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sat, 18 Feb 2012 14:46:45 +0100 +Subject: [PATCH 196/202] MIPS: BCM47XX: return number of written bytes in + nvram_getenv + + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + arch/mips/bcm47xx/nvram.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +--- a/arch/mips/bcm47xx/nvram.c ++++ b/arch/mips/bcm47xx/nvram.c +@@ -192,8 +192,7 @@ int nvram_getenv(char *name, char *val, + value = eq + 1; + if ((eq - var) == strlen(name) && + strncmp(var, name, (eq - var)) == 0) { +- snprintf(val, val_len, "%s", value); +- return 0; ++ return snprintf(val, val_len, "%s", value); + } + } + return NVRAM_ERR_ENVNOTFOUND; |