summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2013-03-23 23:50:28 +0000
committerTom Rini <trini@ti.com>2013-05-01 16:24:00 -0400
commitea009d4743ab4b801703982086e053e74266ff4c (patch)
treef9e52f708bf7d38306dc4e85edebb33422e8563c /common/cmd_nvedit.c
parent2e222105c5e5592aefdb2ac889cf4934d222eb14 (diff)
downloadu-boot-imx-ea009d4743ab4b801703982086e053e74266ff4c.zip
u-boot-imx-ea009d4743ab4b801703982086e053e74266ff4c.tar.gz
u-boot-imx-ea009d4743ab4b801703982086e053e74266ff4c.tar.bz2
hashtable: preparations to use hexport_r() for "env grep"
The output of "env grep" is unsorted, and printing is done by a private implementation to parse the hash table. We have all the needed code in place in hexport_r() alsready, so let's use this instead. Here we prepare the code for this, without any functional changes yet. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index d893aa1..49b9d74 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2000-2010
+ * (C) Copyright 2000-2013
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
@@ -892,7 +892,9 @@ NXTARG: ;
argv++;
if (sep) { /* export as text file */
- len = hexport_r(&env_htab, sep, 0, &addr, size, argc, argv);
+ len = hexport_r(&env_htab, sep,
+ H_MATCH_KEY | H_MATCH_IDENT,
+ &addr, size, argc, argv);
if (len < 0) {
error("Cannot export environment: errno = %d\n", errno);
return 1;
@@ -910,7 +912,9 @@ NXTARG: ;
else /* export as raw binary data */
res = addr;
- len = hexport_r(&env_htab, '\0', 0, &res, ENV_SIZE, argc, argv);
+ len = hexport_r(&env_htab, '\0',
+ H_MATCH_KEY | H_MATCH_IDENT,
+ &res, ENV_SIZE, argc, argv);
if (len < 0) {
error("Cannot export environment: errno = %d\n", errno);
return 1;