projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a027237
)
MIPS: BCM47XX: return number of written bytes in nvram_getenv
author
Hauke Mehrtens
<hauke@hauke-m.de>
Mon, 27 Feb 2012 23:56:11 +0000
(
00:56
+0100)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 5 Mar 2012 20:20:50 +0000
(15:20 -0500)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
arch/mips/bcm47xx/nvram.c
patch
|
blob
|
history
diff --git
a/arch/mips/bcm47xx/nvram.c
b/arch/mips/bcm47xx/nvram.c
index
a84e3bb
..
d43ceff
100644
(file)
--- 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;