diff options
author | Joe Hershberger | 2012-12-11 22:16:19 -0600 |
---|---|---|
committer | Tom Rini | 2012-12-13 11:46:54 -0700 |
commit | c4e0057fa78ebb524b9241ad7245fcd1074ba414 (patch) | |
tree | 5edef36e43886efa384a8fb373263e0a62c228d4 /include/search.h | |
parent | e772cb30f649c1bb8c9cb15e4c05cbf0760f2f61 (diff) |
env: Refactor do_apply to a flag
Use a flag in hsearch_r for insert mode passed from import to allow the
behavior be different based on use.
Now that "do_check" is called for all imports, ensure console init is
complete before updating the console on relocation import
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/search.h')
-rw-r--r-- | include/search.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/search.h b/include/search.h index 93e1cbc6d0b..f5165b0a989 100644 --- a/include/search.h +++ b/include/search.h @@ -73,7 +73,7 @@ struct hsearch_data { extern int hcreate_r(size_t __nel, struct hsearch_data *__htab); /* Destroy current internal hashing table. */ -extern void hdestroy_r(struct hsearch_data *__htab, int do_apply); +extern void hdestroy_r(struct hsearch_data *__htab); /* * Search for entry matching ITEM.key in internal hash table. If @@ -82,7 +82,7 @@ extern void hdestroy_r(struct hsearch_data *__htab, int do_apply); * ITEM.data. * */ extern int hsearch_r(ENTRY __item, ACTION __action, ENTRY ** __retval, - struct hsearch_data *__htab); + struct hsearch_data *__htab, int __flag); /* * Search for an entry matching `MATCH'. Otherwise, Same semantics @@ -99,7 +99,7 @@ extern int hstrstr_r(const char *__match, int __last_idx, ENTRY ** __retval, /* Search and delete entry matching ITEM.key in internal hash table. */ extern int hdelete_r(const char *__key, struct hsearch_data *__htab, - int do_apply); + int __flag); extern ssize_t hexport_r(struct hsearch_data *__htab, const char __sep, char **__resp, size_t __size, @@ -113,10 +113,11 @@ extern ssize_t hexport_r(struct hsearch_data *__htab, */ extern int himport_r(struct hsearch_data *__htab, const char *__env, size_t __size, const char __sep, - int __flag, int nvars, char * const vars[], int do_apply); + int __flag, int nvars, char * const vars[]); -/* Flags for himport_r() */ -#define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */ -#define H_FORCE (1 << 1) /* overwrite read-only/write-once variables */ +/* Flags for himport_r(), hdelete_r(), and hsearch_r() */ +#define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */ +#define H_FORCE (1 << 1) /* overwrite read-only/write-once variables */ +#define H_INTERACTIVE (1 << 2) /* indicate that an import is user directed */ #endif /* search.h */ |