aboutsummaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-01 09:46:45 -0600
committerTom Rini <trini@konsulko.com>2019-08-11 16:43:41 -0400
commitb9ca02c2d554cb46a4579e1382561c529820b494 (patch)
tree92170560516fc8fb611e854922e396bc6f4cf331 /include/env.h
parent3f989e7b0e43402d0a50e19939e4f57374319734 (diff)
downloadu-boot-b9ca02c2d554cb46a4579e1382561c529820b494.zip
u-boot-b9ca02c2d554cb46a4579e1382561c529820b494.tar.gz
u-boot-b9ca02c2d554cb46a4579e1382561c529820b494.tar.bz2
env: Move envmatch() to env.h
Move envmatch() over to the new header file. Also rename it to env_match() to better line up with other functions. 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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index 7298096..bf34ac3 100644
--- a/include/env.h
+++ b/include/env.h
@@ -40,6 +40,17 @@ int env_init(void);
void env_relocate(void);
/**
+ * env_match() - Match a name / name=value pair
+ *
+ * This is used prior to relocation for finding envrionment variables
+ *
+ * @name: A simple 'name', or a 'name=value' pair.
+ * @index: The environment index for a 'name2=value2' pair.
+ * @return index for the value if the names match, else -1.
+ */
+int env_match(unsigned char *name, int index);
+
+/**
* env_get_f() - Look up the value of an environment variable (early)
*
* This function is called from env_get() if the environment has not been