X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=list.c;fp=list.c;h=a336b84aff7569223d1ec1c9546506df9aa7c5e7;hp=99179712e8b88c6b567ca04e1b9046edcd8b3b33;hb=fcb93b2ca79dbddd7a8754f65d72b78c4d6c13b5;hpb=ad70b02f42a0fb95d479d46cc84dd8470abc917e diff --git a/list.c b/list.c index 9917971..a336b84 100644 --- a/list.c +++ b/list.c @@ -358,6 +358,18 @@ done: } 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;