projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add convenience functions for looking up packages/sections/options
[project/uci.git]
/
list.c
diff --git
a/list.c
b/list.c
index
9917971
..
a336b84
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-358,6
+358,18
@@
done:
}
int
}
int
+uci_lookup_next(struct uci_context *ctx, struct uci_element **e, struct uci_list *list, const char *name)
+{
+ UCI_HANDLE_ERR(ctx);
+
+ *e = uci_lookup_list(list, name);
+ if (!*e)
+ UCI_THROW(ctx, UCI_ERR_NOTFOUND);
+
+ return 0;
+}
+
+int
uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended)
{
struct uci_element *e;
uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended)
{
struct uci_element *e;