mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-18 00:23:03 -04:00
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>
This commit is contained in:
parent
4928e97c85
commit
75678c807a
@ -380,13 +380,13 @@ int _do_setenv (int flag, int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setenv (char *varname, char *varvalue)
|
int setenv (char *varname, char *varvalue)
|
||||||
{
|
{
|
||||||
char *argv[4] = { "setenv", varname, varvalue, NULL };
|
char *argv[4] = { "setenv", varname, varvalue, NULL };
|
||||||
if (varvalue == NULL)
|
if (varvalue == NULL)
|
||||||
_do_setenv (0, 2, argv);
|
return _do_setenv (0, 2, argv);
|
||||||
else
|
else
|
||||||
_do_setenv (0, 3, argv);
|
return _do_setenv (0, 3, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HAS_UID
|
#ifdef CONFIG_HAS_UID
|
||||||
|
@ -52,7 +52,7 @@ void setup_revision_tag (struct tag **params);
|
|||||||
/* To be fixed! */
|
/* To be fixed! */
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/* common/cmd_nvedit.c */
|
/* common/cmd_nvedit.c */
|
||||||
void setenv (char *, char *);
|
int setenv (char *, char *);
|
||||||
|
|
||||||
/* cpu/.../interrupt.c */
|
/* cpu/.../interrupt.c */
|
||||||
void reset_timer_masked (void);
|
void reset_timer_masked (void);
|
||||||
|
@ -243,9 +243,9 @@ char *getenv (char *);
|
|||||||
int getenv_r (char *name, char *buf, unsigned len);
|
int getenv_r (char *name, char *buf, unsigned len);
|
||||||
int saveenv (void);
|
int saveenv (void);
|
||||||
#ifdef CONFIG_PPC /* ARM version to be fixed! */
|
#ifdef CONFIG_PPC /* ARM version to be fixed! */
|
||||||
void inline setenv (char *, char *);
|
int inline setenv (char *, char *);
|
||||||
#else
|
#else
|
||||||
void setenv (char *, char *);
|
int setenv (char *, char *);
|
||||||
#ifdef CONFIG_HAS_UID
|
#ifdef CONFIG_HAS_UID
|
||||||
void forceenv (char *, char *);
|
void forceenv (char *, char *);
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@ void vprintf(const char *, va_list);
|
|||||||
void do_reset (void);
|
void do_reset (void);
|
||||||
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
|
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
|
||||||
char *getenv (char *name);
|
char *getenv (char *name);
|
||||||
void setenv (char *varname, char *varvalue);
|
int setenv (char *varname, char *varvalue);
|
||||||
long simple_strtol(const char *cp,char **endp,unsigned int base);
|
long simple_strtol(const char *cp,char **endp,unsigned int base);
|
||||||
int strcmp(const char * cs,const char * ct);
|
int strcmp(const char * cs,const char * ct);
|
||||||
#ifdef CONFIG_HAS_UID
|
#ifdef CONFIG_HAS_UID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user