summaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-01 18:46:50 +0300
committerTom Rini <trini@konsulko.com>2019-08-11 23:43:41 +0300
commitcdbff9fc4002fdd47181088d5abe90e5f2fa1904 (patch)
tree833d690735da8fe451d8efd805c0c8ae4d0da50c /include/env.h
parent6bf6dbee0111d40b4b37799d24eed8b6af7d7b29 (diff)
downloadu-boot-cdbff9fc4002fdd47181088d5abe90e5f2fa1904.tar.xz
env: Move env_get_hex() to env.h
Move env_get_hex() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
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 d7190da335..dd063feb39 100644
--- a/include/env.h
+++ b/include/env.h
@@ -94,6 +94,18 @@ ulong env_get_ulong(const char *name, int base, ulong default_val);
int env_set_ulong(const char *varname, ulong value);
/**
+ * env_get_hex() - Return an environment variable as a hex value
+ *
+ * Decode an environment as a hex number (it may or may not have a 0x
+ * prefix). If the environment variable cannot be found, or does not start
+ * with hex digits, the default value is returned.
+ *
+ * @varname: Variable to decode
+ * @default_val: Value to return on error
+ */
+ulong env_get_hex(const char *varname, ulong default_val);
+
+/**
* env_set_hex() - set an environment variable to a hex value
*
* @varname: Variable to adjust