From 0ac7d722ede8e64973f68dbcd07b9521ba04cb63 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:47:00 -0600 Subject: env: Move get/set_default_env() to env.h Move these functions to the new header file and rename set_default_env() to env_set_default() so that it has a consistent env_ prefix. Acked-by: Joe Hershberger Signed-off-by: Simon Glass --- include/env.h | 11 +++++++++++ include/environment.h | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/env.h b/include/env.h index 0b03f8aa427..7204a4bc550 100644 --- a/include/env.h +++ b/include/env.h @@ -257,4 +257,15 @@ int env_export(struct environment_s *env_out); int env_import_redund(const char *buf1, int buf1_read_fail, const char *buf2, int buf2_read_fail); +/** + * env_get_default() - Look up a variable from the default environment + * + * @name: Variable to look up + * @return value if found, NULL if not found in default environment + */ +char *env_get_default(const char *name); + +/* [re]set to the default environment */ +void env_set_default(const char *s, int flags); + #endif diff --git a/include/environment.h b/include/environment.h index 27c0fee65f1..ef391cc21a5 100644 --- a/include/environment.h +++ b/include/environment.h @@ -265,12 +265,6 @@ struct env_driver { extern struct hsearch_data env_htab; -/* Look up the variable from the default environment */ -char *env_get_default(const char *name); - -/* [re]set to the default environment */ -void set_default_env(const char *s, int flags); - /** * env_get_char() - Get a character from the early environment * -- cgit v1.2.3