summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:10 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:23:32 -0400
commit018f530323b2cc41be05be5b12375d3648f06554 (patch)
treeb397b84a059e5b704c20c9097577ada6fc4ba296 /include/common.h
parent382bee57f19b4454e2015bc19a010bc2d0ab9337 (diff)
env: Rename common functions related to setenv()
We are now using an env_ prefix for environment functions. Rename these commonly used functions, 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.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h
index 0b543f3dba2..3f884d536e5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -349,18 +349,34 @@ int getenv_yesno(const char *var);
*/
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);
/**
- * setenv_addr - Set an environment variable to an address in hex
+ * env_set_ulong() - set an environment variable to an integer
+ *
+ * @varname: Variable to adjust
+ * @value: Value to set for the variable (will be converted to a string)
+ * @return 0 if OK, 1 on error
+ */
+int env_set_ulong(const char *varname, ulong value);
+
+/**
+ * env_set_hex() - set an environment variable to a hex value
+ *
+ * @varname: Variable to adjust
+ * @value: Value to set for the variable (will be converted to a hex string)
+ * @return 0 if OK, 1 on error
+ */
+int env_set_hex(const char *varname, ulong value);
+
+/**
+ * env_set_addr - Set an environment variable to an address in hex
*
* @varname: Environment variable to set
* @addr: Value to set it to
* @return 0 if ok, 1 on error
*/
-static inline int setenv_addr(const char *varname, const void *addr)
+static inline int env_set_addr(const char *varname, const void *addr)
{
- return setenv_hex(varname, (ulong)addr);
+ return env_set_hex(varname, (ulong)addr);
}
#ifdef CONFIG_AUTO_COMPLETE