summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-20 14:27:19 -0500
committerTom Rini <trini@konsulko.com>2015-05-21 09:13:19 -0400
commitcca98fd6aa111f622be09ffdb5c59684c5e160af (patch)
treeb6390d453a085825c1d260dbe69a2433d6f86b77 /include
parent032ea185d644cfe420822dd3dc84734623ffac91 (diff)
downloadblackbird-obmc-uboot-cca98fd6aa111f622be09ffdb5c59684c5e160af.tar.gz
blackbird-obmc-uboot-cca98fd6aa111f622be09ffdb5c59684c5e160af.zip
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 <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/env_attr.h10
1 files changed, 5 insertions, 5 deletions
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__ */
OpenPOWER on IntegriCloud