diff options
author | Simon Glass | 2019-08-01 09:46:45 -0600 |
---|---|---|
committer | Tom Rini | 2019-08-11 16:43:41 -0400 |
commit | b9ca02c2d554cb46a4579e1382561c529820b494 (patch) | |
tree | 92170560516fc8fb611e854922e396bc6f4cf331 /cmd | |
parent | 3f989e7b0e43402d0a50e19939e4f57374319734 (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')
-rw-r--r-- | cmd/nvedit.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 4f3edab8b9d..751b77d0e98 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; |