summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
authorSteven A. Falco <sfalco@harris.com>2008-06-12 13:22:12 -0400
committerWolfgang Denk <wd@denx.de>2008-07-01 23:03:14 +0200
commit75678c807a6272ecc5541eb32898c93887f08400 (patch)
tree6bfbb1388af69cc3ec8627d305f74a097fdeb24a /common/cmd_nvedit.c
parent4928e97c8531283ca9b368b7c29a8a12e726562a (diff)
downloadu-boot-imx-75678c807a6272ecc5541eb32898c93887f08400.zip
u-boot-imx-75678c807a6272ecc5541eb32898c93887f08400.tar.gz
u-boot-imx-75678c807a6272ecc5541eb32898c93887f08400.tar.bz2
Make setenv() return status
Currently, the setenv function does not return an error code. This patch allows to test for errors. Signed-off-by: Steve Falco <sfalco@harris.com>
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 49f134a..b102ae3 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -380,13 +380,13 @@ int _do_setenv (int flag, int argc, char *argv[])
return 0;
}
-void setenv (char *varname, char *varvalue)
+int setenv (char *varname, char *varvalue)
{
char *argv[4] = { "setenv", varname, varvalue, NULL };
if (varvalue == NULL)
- _do_setenv (0, 2, argv);
+ return _do_setenv (0, 2, argv);
else
- _do_setenv (0, 3, argv);
+ return _do_setenv (0, 3, argv);
}
#ifdef CONFIG_HAS_UID