diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-02-28 00:56:11 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:20:50 -0500 |
commit | 44d4b2ae94b19080d6d033a1f5cf2cc47443be3b (patch) | |
tree | 714b05a738bdce1545345704e95ece7fd4e7a872 /arch/mips/bcm47xx/nvram.c | |
parent | a027237a56f7d519eee5749cfb720e568d0bb0b6 (diff) | |
download | talos-op-linux-44d4b2ae94b19080d6d033a1f5cf2cc47443be3b.tar.gz talos-op-linux-44d4b2ae94b19080d6d033a1f5cf2cc47443be3b.zip |
MIPS: BCM47XX: return number of written bytes in nvram_getenv
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'arch/mips/bcm47xx/nvram.c')
-rw-r--r-- | arch/mips/bcm47xx/nvram.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c index a84e3bb7387f..d43ceff5be47 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -107,8 +107,7 @@ int nvram_getenv(char *name, char *val, size_t val_len) 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; |