summaryrefslogtreecommitdiff
path: root/cmd/nvedit.c
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 /cmd/nvedit.c
parent3f989e7b0e43402d0a50e19939e4f57374319734 (diff)
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 'cmd/nvedit.c')
-rw-r--r--cmd/nvedit.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 4f3edab8b9..751b77d0e9 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -709,7 +709,7 @@ int env_get_f(const char *name, char *buf, unsigned len)
return -1;
}
- val = envmatch((uchar *)name, i);
+ val = env_match((uchar *)name, i);
if (val < 0)
continue;
@@ -785,15 +785,7 @@ U_BOOT_CMD(
#endif
#endif /* CONFIG_SPL_BUILD */
-
-/*
- * Match a name / name=value pair
- *
- * s1 is either a simple 'name', or a 'name=value' pair.
- * i2 is the environment index for a 'name2=value2' pair.
- * If the names match, return the index for the value2, else -1.
- */
-int envmatch(uchar *s1, int i2)
+int env_match(uchar *s1, int i2)
{
if (s1 == NULL)
return -1;