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>
diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 0a179ad..1233b1a 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -143,7 +143,7 @@
BUG_ON(env_ptr != NULL);
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;