From cdbff9fc4002fdd47181088d5abe90e5f2fa1904 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:50 -0600 Subject: env: Move env_get_hex() to env.h Move env_get_hex() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/x86/lib/zimage.c | 1 + cmd/elf.c | 1 + common/image-fdt.c | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 230b38e..6a6258a 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/cmd/elf.c b/cmd/elf.c index d883be4..5e5cf47 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/common/image-fdt.c b/common/image-fdt.c index e70da3d..4247dce 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 8305007..8d8bbc4 100644 --- a/include/common.h +++ b/include/common.h @@ -158,18 +158,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); char *env_get(const char *varname); /** - * 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() - set an environment variable * * This sets or deletes the value of an environment variable. For setting the diff --git a/include/env.h b/include/env.h index d7190da..dd063fe 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 -- cgit v1.1