diff options
Diffstat (limited to 'include/env.h')
-rw-r--r-- | include/env.h | 12 |
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 |