diff options
Diffstat (limited to 'include/env.h')
-rw-r--r-- | include/env.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h index 9778e3e4f2c..d2a5954ded8 100644 --- a/include/env.h +++ b/include/env.h @@ -356,6 +356,16 @@ int env_import_redund(const char *buf1, int buf1_read_fail, */ char *env_get_default(const char *name); +/** + * env_get_default_into() - Look up a variable from the default environment and + * copy its value in buf. + * + * @name: Variable to look up + * Return: actual length of the variable value excluding the terminating + * NULL-byte, or -1 if the variable is not found + */ +int env_get_default_into(const char *name, char *buf, unsigned int len); + /* [re]set to the default environment */ void env_set_default(const char *s, int flags); |