Skip to content

Commit

Permalink
MIPS: BCM47XX: return number of written bytes in nvram_getenv
Browse files Browse the repository at this point in the history
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Mar 5, 2012
1 parent a027237 commit 44d4b2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/mips/bcm47xx/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 44d4b2a

Please sign in to comment.