mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-17 07:56:25 -04:00
[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,6 +391,9 @@ int _do_setenv (int flag, int argc, char *argv[])
|
|||||||
void setenv (char *varname, char *varvalue)
|
void setenv (char *varname, char *varvalue)
|
||||||
{
|
{
|
||||||
char *argv[4] = { "setenv", varname, varvalue, NULL };
|
char *argv[4] = { "setenv", varname, varvalue, NULL };
|
||||||
|
if (varvalue == NULL)
|
||||||
|
_do_setenv (0, 2, argv);
|
||||||
|
else
|
||||||
_do_setenv (0, 3, argv);
|
_do_setenv (0, 3, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user