aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-01 09:46:51 -0600
committerTom Rini <trini@konsulko.com>2019-08-11 16:43:41 -0400
commit9fb625ce05539fe6876a59ce1dcadb76b33c6f6e (patch)
treec80c104efa35776e942d3772db3514debbd24e61 /include
parentcdbff9fc4002fdd47181088d5abe90e5f2fa1904 (diff)
downloadu-boot-9fb625ce05539fe6876a59ce1dcadb76b33c6f6e.zip
u-boot-9fb625ce05539fe6876a59ce1dcadb76b33c6f6e.tar.gz
u-boot-9fb625ce05539fe6876a59ce1dcadb76b33c6f6e.tar.bz2
env: Move env_set() to env.h
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/command.h1
-rw-r--r--include/common.h12
-rw-r--r--include/env.h12
-rw-r--r--include/env_flags.h1
-rw-r--r--include/exports.h1
-rw-r--r--include/net.h1
-rw-r--r--include/search.h1
7 files changed, 17 insertions, 12 deletions
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 <env.h>
#include <linker_lists.h>
#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 <env.h>
#include <search.h>
/*
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 <env.h>
#include <phy_interface.h>
#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 <asm/cache.h>
#include <asm/byteorder.h> /* for nton* / ntoh* stuff */
+#include <env.h>
#include <linux/if_ether.h>
#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 <env.h>
#include <stddef.h>
#define __set_errno(val) do { errno = val; } while (0)