From cca98fd6aa111f622be09ffdb5c59684c5e160af Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 20 May 2015 14:27:19 -0500 Subject: env: Allow env_attr_walk to pass a priv * to callback In some cases it can be helpful to have context in the callback about the calling situation. This is needed for following patches. Signed-off-by: Joe Hershberger Reviewed-by: Simon Glass --- include/env_attr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/env_attr.h') diff --git a/include/env_attr.h b/include/env_attr.h index b82fec91be..7bfb7f30d1 100644 --- a/include/env_attr.h +++ b/include/env_attr.h @@ -16,13 +16,14 @@ * attributes = [^,:\s]* * entry = name[:attributes] * list = entry[,list] - * It will call the "callback" function with the "name" and attribute as "value" + * It will call the "callback" function with the "name" and "attributes" * The callback may return a non-0 to abort the list walk. * This return value will be passed through to the caller. * 0 is returned on success. */ -extern int env_attr_walk(const char *attr_list, - int (*callback)(const char *name, const char *value)); +int env_attr_walk(const char *attr_list, + int (*callback)(const char *name, const char *attributes, void *priv), + void *priv); /* * env_attr_lookup takes as input an "attr_list" with the same form as above. @@ -33,7 +34,6 @@ extern int env_attr_walk(const char *attr_list, * "attr_list" is NULL. * Returns 0 on success. */ -extern int env_attr_lookup(const char *attr_list, const char *name, - char *attributes); +int env_attr_lookup(const char *attr_list, const char *name, char *attributes); #endif /* __ENV_ATTR_H__ */ -- cgit v1.2.1