summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
new file mode 100644
index 0000000000..7d8180b1e1
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
@@ -0,0 +1,13 @@
+
+--- a/arch/mips/bcm47xx/nvram.c
++++ b/arch/mips/bcm47xx/nvram.c
+@@ -243,8 +243,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;