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>
This commit is contained in:
Родитель
a027237a56
Коммит
44d4b2ae94
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче