env: allow to export only selected variables
New syntax: env export [-t | -b | -c] [-s size] addr [var ...] With this change it is possible to provide a list of variables names that shall be exported. Whenno arguments are given, the whole environment gets exported. NOTE: The new handling of the "size" argument means a change to the user API. Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
@@ -94,7 +94,7 @@ int saveenv(void)
|
||||
int rcode = 0;
|
||||
|
||||
res = (char *)&env_new.data;
|
||||
len = hexport_r(&env_htab, '\0', &res, ENV_SIZE);
|
||||
len = hexport_r(&env_htab, '\0', &res, ENV_SIZE, 0, NULL);
|
||||
if (len < 0) {
|
||||
error("Cannot export environment: errno = %d\n", errno);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user