diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-01 09:46:48 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-11 16:43:41 -0400 |
commit | 9eef56dbe34596b403e8c476c2e30ed697638f77 (patch) | |
tree | 917be500e60ca5857d583a6b9bc37753fbf829e8 /include | |
parent | 168068fb3d7da3d95bf37b21f39347f48d38497f (diff) | |
download | u-boot-9eef56dbe34596b403e8c476c2e30ed697638f77.tar.gz |
env: Move env_get_ulong() to env.h
Move env_get_ulong() 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')
-rw-r--r-- | include/common.h | 13 | ||||
-rw-r--r-- | include/env.h | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/include/common.h b/include/common.h index 283cb23fd1..48f443e851 100644 --- a/include/common.h +++ b/include/common.h @@ -158,19 +158,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); char *env_get(const char *varname); /** - * env_get_ulong() - Return an environment variable as an integer value - * - * Most U-Boot environment variables store hex values. For those which store - * (e.g.) base-10 integers, this function can be used to read the value. - * - * @name: Variable to look up - * @base: Base to use (e.g. 10 for base 10, 2 for binary) - * @default_val: Default value to return if no value is found - * @return the value found, or @default_val if none - */ -ulong env_get_ulong(const char *name, int base, ulong default_val); - -/** * 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 diff --git a/include/env.h b/include/env.h index 8898b78b8e..9124718f2d 100644 --- a/include/env.h +++ b/include/env.h @@ -64,6 +64,19 @@ int env_match(unsigned char *name, int index); int env_get_f(const char *name, char *buf, unsigned int len); /** + * env_get_ulong() - Return an environment variable as an integer value + * + * Most U-Boot environment variables store hex values. For those which store + * (e.g.) base-10 integers, this function can be used to read the value. + * + * @name: Variable to look up + * @base: Base to use (e.g. 10 for base 10, 2 for binary) + * @default_val: Default value to return if no value is found + * @return the value found, or @default_val if none + */ +ulong env_get_ulong(const char *name, int base, ulong default_val); + +/** * env_set_ulong() - set an environment variable to an integer * * @varname: Variable to adjust |