env: Move env_get_yesno() to env.h
authorSimon Glass <sjg@chromium.org>
Thu, 1 Aug 2019 15:46:49 +0000 (09:46 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
Move env_get_yesno() over to the new header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
arch/powerpc/cpu/mpc85xx/mp.c
board/gateworks/gw_ventana/gw_ventana_spl.c
cmd/source.c
include/common.h
include/env.h

index b0aa72e..119d4b3 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/processor.h>
 #include <ioports.h>
 #include <lmb.h>
index 740fc57..6886ff9 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/io.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-ddr.h>
index 1a9a71a..3a51ebf 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <image.h>
 #include <malloc.h>
 #include <mapmem.h>
index 48f443e..8305007 100644 (file)
@@ -169,12 +169,6 @@ char *env_get(const char *varname);
  */
 ulong env_get_hex(const char *varname, ulong default_val);
 
-/*
- * Read an environment variable as a boolean
- * Return -1 if variable does not exist (default to true)
- */
-int env_get_yesno(const char *var);
-
 /**
  * env_set() - set an environment variable
  *
index 9124718..d7190da 100644 (file)
@@ -63,6 +63,14 @@ int env_match(unsigned char *name, int index);
  */
 int env_get_f(const char *name, char *buf, unsigned int len);
 
+/**
+ * env_get_yesno() - Read an environment variable as a boolean
+ *
+ * @return 1 if yes/true (Y/y/T/t), -1 if variable does not exist (i.e. default
+ *     to true), 0 if otherwise
+ */
+int env_get_yesno(const char *var);
+
 /**
  * env_get_ulong() - Return an environment variable as an integer value
  *