From 26a41790f8eba19ad450e18ae91351daf485b3e2 Mon Sep 17 00:00:00 2001
From: Rafal Jaworowski <raj@semihalf.com>
Date: Wed, 9 Jan 2008 18:05:27 +0100
Subject: [PATCH] Globalize envmatch()

The newly introduced API (routines related to env vars) will need to call
it.

Signed-off-by: Rafal Zabdyr <armo@semihalf.com>
---
 common/cmd_nvedit.c | 5 +----
 include/common.h    | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 67704088104..dd263b66663 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -81,8 +81,6 @@ extern void env_crc_update (void);
 /************************************************************************
 ************************************************************************/
 
-static int envmatch (uchar *, int);
-
 /*
  * Table with supported baudrates (defined in config_xyz.h)
  */
@@ -576,8 +574,7 @@ int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  * If the names match, return the index for the value2, else NULL.
  */
 
-static int
-envmatch (uchar *s1, int i2)
+int envmatch (uchar *s1, int i2)
 {
 
 	while (*s1 == env_get_char(i2++))
diff --git a/include/common.h b/include/common.h
index 493417f8776..da2f01b464d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -227,6 +227,7 @@ extern ulong load_addr;		/* Default Load Address */
 /* common/cmd_nvedit.c */
 int	env_init     (void);
 void	env_relocate (void);
+int	envmatch     (uchar *, int);
 char	*getenv	     (char *);
 int	getenv_r     (char *name, char *buf, unsigned len);
 int	saveenv	     (void);
-- 
GitLab