From 37f2fe7472a34531e7d585eb7e0730b4f8e1f213 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 6 Nov 2011 22:49:44 +0100 Subject: 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 --- common/env_flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/env_flash.c') diff --git a/common/env_flash.c b/common/env_flash.c index 50ca4ffa56..8e415d72d3 100644 --- a/common/env_flash.c +++ b/common/env_flash.c @@ -155,7 +155,7 @@ int saveenv(void) } 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); goto done; @@ -289,7 +289,7 @@ int saveenv(void) goto done; 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); goto done; -- cgit v1.2.1