From 9fb625ce05539fe6876a59ce1dcadb76b33c6f6e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:51 -0600 Subject: env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger Signed-off-by: Simon Glass --- include/command.h | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ include/env_flags.h | 1 + include/exports.h | 1 + include/net.h | 1 + include/search.h | 1 + 7 files changed, 17 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/command.h b/include/command.h index 2bfee89..f6170e7 100644 --- a/include/command.h +++ b/include/command.h @@ -10,6 +10,7 @@ #ifndef __COMMAND_H #define __COMMAND_H +#include #include #ifndef NULL diff --git a/include/common.h b/include/common.h index 8d8bbc4..739bbd4 100644 --- a/include/common.h +++ b/include/common.h @@ -157,18 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_set() - set an environment variable - * - * This sets or deletes the value of an environment variable. For setting the - * value the variable is created if it does not already exist. - * - * @varname: Variable to adjust - * @value: Value to set for the variable, or NULL or "" to delete the variable - * @return 0 if OK, 1 on error - */ -int env_set(const char *varname, const char *value); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index dd063fe..6770a61 100644 --- a/include/env.h +++ b/include/env.h @@ -72,6 +72,18 @@ int env_get_f(const char *name, char *buf, unsigned int len); int env_get_yesno(const char *var); /** + * env_set() - set an environment variable + * + * This sets or deletes the value of an environment variable. For setting the + * value the variable is created if it does not already exist. + * + * @varname: Variable to adjust + * @value: Value to set for the variable, or NULL or "" to delete the variable + * @return 0 if OK, 1 on error + */ +int env_set(const char *varname, const char *value); + +/** * env_get_ulong() - Return an environment variable as an integer value * * Most U-Boot environment variables store hex values. For those which store diff --git a/include/env_flags.h b/include/env_flags.h index 23744e3..f230643 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -146,6 +146,7 @@ int env_flags_validate_env_set_params(char *name, char *const val[], int count); #else /* !USE_HOSTCC */ +#include #include /* diff --git a/include/exports.h b/include/exports.h index bf8d53c..147a00f 100644 --- a/include/exports.h +++ b/include/exports.h @@ -3,6 +3,7 @@ #ifndef __ASSEMBLY__ #ifdef CONFIG_PHY_AQUANTIA +#include #include #endif diff --git a/include/net.h b/include/net.h index 7684076..0262175 100644 --- a/include/net.h +++ b/include/net.h @@ -14,6 +14,7 @@ #include #include /* for nton* / ntoh* stuff */ +#include #include #define DEBUG_LL_STATE 0 /* Link local state machine changes */ diff --git a/include/search.h b/include/search.h index 5d07b49..9750336 100644 --- a/include/search.h +++ b/include/search.h @@ -14,6 +14,7 @@ #ifndef _SEARCH_H_ #define _SEARCH_H_ +#include #include #define __set_errno(val) do { errno = val; } while (0) -- cgit v1.1