summaryrefslogtreecommitdiffstats
path: root/lib/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r--lib/hashtable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 6861a42029..7c6b96cac8 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -522,7 +522,7 @@ static int cmpkey(const void *p1, const void *p2)
return (strcmp(e1->key, e2->key));
}
-ssize_t hexport_r(struct hsearch_data *htab, const char sep,
+ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
char **resp, size_t size,
int argc, char * const argv[])
{
@@ -559,6 +559,9 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep,
if ((argc > 0) && (found == 0))
continue;
+ if ((flag & H_HIDE_DOT) && ep->key[0] == '.')
+ continue;
+
list[n++] = ep;
totlen += strlen(ep->key) + 2;
OpenPOWER on IntegriCloud