Root/target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch

1From 3ac18c5072e097ffa719994ef3b5c64e744a5405 Mon Sep 17 00:00:00 2001
2From: Hauke Mehrtens <hauke@hauke-m.de>
3Date: Sat, 18 Feb 2012 14:46:45 +0100
4Subject: [PATCH 196/202] MIPS: BCM47XX: return number of written bytes in
5 nvram_getenv
6
7
8Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9---
10 arch/mips/bcm47xx/nvram.c | 3 +--
11 1 files changed, 1 insertions(+), 2 deletions(-)
12
13--- a/arch/mips/bcm47xx/nvram.c
14+++ b/arch/mips/bcm47xx/nvram.c
15@@ -192,8 +192,7 @@ int nvram_getenv(char *name, char *val,
16         value = eq + 1;
17         if ((eq - var) == strlen(name) &&
18             strncmp(var, name, (eq - var)) == 0) {
19- snprintf(val, val_len, "%s", value);
20- return 0;
21+ return snprintf(val, val_len, "%s", value);
22         }
23     }
24     return NVRAM_ERR_ENVNOTFOUND;
25

Archive Download this file



interactive