From 348b1f1c6064990210a6797c86514fd358b73062 Mon Sep 17 00:00:00 2001 From: Gerlando Falauto Date: Fri, 24 Aug 2012 00:11:38 +0000 Subject: env: make himport_r() selective on variables Add 2 new arguments to himport_r(): o "nvars", "vars": number and list of variables to take into account (0 means ALL) NOTE: This patch does not change the current behaviour. Signed-off-by: Gerlando Falauto Reviewed-by: Marek Vasut --- include/search.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/search.h') diff --git a/include/search.h b/include/search.h index a4a5ef4956b..94d75fc65c2 100644 --- a/include/search.h +++ b/include/search.h @@ -94,9 +94,13 @@ extern ssize_t hexport_r(struct hsearch_data *__htab, const char __sep, char **__resp, size_t __size, int argc, char * const argv[]); +/* + * nvars: length of vars array + * vars: array of strings (variable names) to import (nvars == 0 means all) + */ extern int himport_r(struct hsearch_data *__htab, const char *__env, size_t __size, const char __sep, - int __flag); + int __flag, int nvars, char * const vars[]); /* Flags for himport_r() */ #define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */ -- cgit v1.2.3