From: Simon Glass Date: Thu, 1 Aug 2019 15:46:48 +0000 (-0600) Subject: env: Move env_get_ulong() to env.h X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=9eef56dbe34596b403e8c476c2e30ed697638f77;p=u-boot.git env: Move env_get_ulong() to env.h Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 0d1c6c4720..873208c668 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -9,6 +9,7 @@ * */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 6ac956caca..43f5404231 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c index 66e4581fae..f443c21e6d 100644 --- a/board/synopsys/hsdk/env-lib.c +++ b/board/synopsys/hsdk/env-lib.c @@ -5,6 +5,7 @@ */ #include "env-lib.h" +#include #define MAX_CMD_LEN 25 diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 6d0fc21c67..4ff9a44b37 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 6417ba4980..f657db87d8 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 283cb23fd1..48f443e851 100644 --- a/include/common.h +++ b/include/common.h @@ -157,19 +157,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 * diff --git a/include/env.h b/include/env.h index 8898b78b8e..9124718f2d 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,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 * diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 464de5b3b5..ef5e54875c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/net/bootp.c b/net/bootp.c index 9a2b512e4a..505489140e 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include