From b9ca02c2d554cb46a4579e1382561c529820b494 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:45 -0600 Subject: 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 Acked-by: Joe Hershberger --- include/common.h | 3 --- include/env.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index cb6b584b709..26ec18ded47 100644 --- a/include/common.h +++ b/include/common.h @@ -145,9 +145,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); /* common/cmd_ext2.c */ int do_ext2load(cmd_tbl_t *, int, int, char * const []); -/* common/cmd_nvedit.c */ -int envmatch (uchar *, int); - /** * env_get() - Look up the value of an environment variable * diff --git a/include/env.h b/include/env.h index 72980962bf7..bf34ac3f862 100644 --- a/include/env.h +++ b/include/env.h @@ -39,6 +39,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) * -- cgit v1.3.1