summaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-01 18:46:51 +0300
committerTom Rini <trini@konsulko.com>2019-08-11 23:43:41 +0300
commit9fb625ce05539fe6876a59ce1dcadb76b33c6f6e (patch)
treec80c104efa35776e942d3772db3514debbd24e61 /include/env.h
parentcdbff9fc4002fdd47181088d5abe90e5f2fa1904 (diff)
downloadu-boot-9fb625ce05539fe6876a59ce1dcadb76b33c6f6e.tar.xz
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/env.h')
-rw-r--r--include/env.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index dd063feb39..6770a6176d 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