summaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-01 18:46:49 +0300
committerTom Rini <trini@konsulko.com>2019-08-11 23:43:41 +0300
commit6bf6dbee0111d40b4b37799d24eed8b6af7d7b29 (patch)
treed208767aba325d564900dbf369d04ec3093539db /include/env.h
parent9eef56dbe34596b403e8c476c2e30ed697638f77 (diff)
downloadu-boot-6bf6dbee0111d40b4b37799d24eed8b6af7d7b29.tar.xz
env: Move env_get_yesno() to env.h
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>
Diffstat (limited to 'include/env.h')
-rw-r--r--include/env.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index 9124718f2d..d7190da335 100644
--- a/include/env.h
+++ b/include/env.h
@@ -64,6 +64,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
*
* Most U-Boot environment variables store hex values. For those which store