[patch] setenv(...) can delete environmentalvariables
update setenv() function so that entering a NULL value for the variable's value will delete the environmental variable Signed-off-by: Jeffrey Mann <mannj@embeddedplanet.com> Acked-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
ebd0a0ae05
commit
9ffd451afe
@ -391,7 +391,10 @@ int _do_setenv (int flag, int argc, char *argv[])
|
||||
void setenv (char *varname, char *varvalue)
|
||||
{
|
||||
char *argv[4] = { "setenv", varname, varvalue, NULL };
|
||||
_do_setenv (0, 3, argv);
|
||||
if (varvalue == NULL)
|
||||
_do_setenv (0, 2, argv);
|
||||
else
|
||||
_do_setenv (0, 3, argv);
|
||||
}
|
||||
|
||||
int do_setenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
|
Loading…
Reference in New Issue
Block a user