summaryrefslogtreecommitdiffstats
path: root/commands/global.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/global.c')
-rw-r--r--commands/global.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/commands/global.c b/commands/global.c
index 427a231a9e..c526e6571a 100644
--- a/commands/global.c
+++ b/commands/global.c
@@ -23,21 +23,6 @@
#include <environment.h>
#include <getopt.h>
-static int globalvar_set(char* name, char* value)
-{
- int ret;
-
- ret = globalvar_add_simple(name);
-
- if (value) {
- char *tmp = asprintf("global.%s", name);
- ret = setenv(tmp, value);
- free(tmp);
- }
-
- return ret ? 1 : 0;
-}
-
static int do_global(int argc, char *argv[])
{
int opt;
@@ -72,7 +57,7 @@ static int do_global(int argc, char *argv[])
return 0;
}
- return globalvar_set(argv[0], value);
+ return globalvar_add_simple(argv[0], value);
}
BAREBOX_CMD_HELP_START(global)