projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
return a pointer to the uci_config struct in uci_load
[project/uci.git]
/
parse.c
diff --git
a/parse.c
b/parse.c
index 4394bf63769f50a58027a76b25a41ff001fb1216..e63f900df6bc99358c7adf3d2d5446aa199d3bc4 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-304,7
+304,7
@@
static void uci_parse_line(struct uci_context *ctx)
}
}
}
}
-int uci_load(struct uci_context *ctx, const char *name)
+int uci_load(struct uci_context *ctx, const char *name
, struct uci_config **cfg
)
{
struct uci_parse_context *pctx;
struct stat statbuf;
{
struct uci_parse_context *pctx;
struct stat statbuf;
@@
-360,6
+360,9
@@
ignore:
/* add to main config file list */
uci_list_add(&ctx->root, &pctx->cfg->list);
/* add to main config file list */
uci_list_add(&ctx->root, &pctx->cfg->list);
+ if (cfg)
+ *cfg = pctx->cfg;
+
pctx->cfg = NULL;
/* no error happened, we can get rid of the parser context now */
pctx->cfg = NULL;
/* no error happened, we can get rid of the parser context now */