- memset(configs, 0, size);
- buf = (char *) &configs[globbuf.gl_pathc + 1];
- for(i = 0; i < globbuf.gl_pathc; i++) {
- char *p;
+ uci_foreach_element(&ctx->root, e) {
+ if (!strcmp(e->name, name))
+ goto found;
+ }
+ UCI_THROW(ctx, UCI_ERR_NOTFOUND);