summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:09 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:22:18 -0400
commit382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch)
tree8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /include/common.h
parent01510091de905c46620757b9027b2e55c4b3b313 (diff)
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h
index 030c179fba..0b543f3dba 100644
--- a/include/common.h
+++ b/include/common.h
@@ -336,7 +336,19 @@ ulong getenv_hex(const char *varname, ulong default_val);
* Return -1 if variable does not exist (default to true)
*/
int getenv_yesno(const char *var);
-int setenv (const char *, const char *);
+
+/**
+ * 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);
+
int setenv_ulong(const char *varname, ulong value);
int setenv_hex(const char *varname, ulong value);
/**