Procházet zdrojové kódy

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>
Simon Glass před 4 roky
rodič
revize
cdbff9fc40
5 změnil soubory, kde provedl 15 přidání a 12 odebrání
  1. 1 0
      arch/x86/lib/zimage.c
  2. 1 0
      cmd/elf.c
  3. 1 0
      common/image-fdt.c
  4. 0 12
      include/common.h
  5. 12 0
      include/env.h

+ 1 - 0
arch/x86/lib/zimage.c

@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <malloc.h>
 #include <asm/acpi_table.h>
 #include <asm/io.h>

+ 1 - 0
cmd/elf.c

@@ -16,6 +16,7 @@
 #include <common.h>
 #include <command.h>
 #include <elf.h>
+#include <env.h>
 #include <environment.h>
 #include <net.h>
 #include <vxworks.h>

+ 1 - 0
common/image-fdt.c

@@ -11,6 +11,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <fdtdec.h>
+#include <env.h>
 #include <errno.h>
 #include <image.h>
 #include <linux/libfdt.h>

+ 0 - 12
include/common.h

@@ -157,18 +157,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
  *

+ 12 - 0
include/env.h

@@ -93,6 +93,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
  *