X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=list.c;h=a336b84aff7569223d1ec1c9546506df9aa7c5e7;hb=fcb93b2ca79dbddd7a8754f65d72b78c4d6c13b5;hp=99179712e8b88c6b567ca04e1b9046edcd8b3b33;hpb=ad70b02f42a0fb95d479d46cc84dd8470abc917e;p=uci.git diff --git a/list.c b/list.c index 9917971..a336b84 100644 --- a/list.c +++ b/list.c @@ -357,6 +357,18 @@ done: return e; } +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) {