diff options
author | bapt <bapt@FreeBSD.org> | 2014-07-19 23:44:57 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-07-19 23:44:57 +0000 |
commit | 6f718e3669e9ecc1b1ca407a465d6ee20571a2b8 (patch) | |
tree | ba71cc26671c93ed9809f7cadb07734c0bddb4c7 /usr.sbin/pkg/config.c | |
parent | 6095428430d025abcf6983536297f168bf62b45b (diff) | |
download | FreeBSD-src-6f718e3669e9ecc1b1ca407a465d6ee20571a2b8.zip FreeBSD-src-6f718e3669e9ecc1b1ca407a465d6ee20571a2b8.tar.gz |
MFC: r263648, r264789, r266636
This brings:
- schema validation
- xpath-like interface for ucl objects
Adapt pkg(7) to the new libucl API
Diffstat (limited to 'usr.sbin/pkg/config.c')
-rw-r--r-- | usr.sbin/pkg/config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index e46da4a..fded95e 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -517,10 +517,10 @@ boolstr_to_bool(const char *str) } static void -config_parse(ucl_object_t *obj, pkg_conf_file_t conftype) +config_parse(const ucl_object_t *obj, pkg_conf_file_t conftype) { struct sbuf *buf = sbuf_new_auto(); - ucl_object_t *cur, *seq; + const ucl_object_t *cur, *seq; ucl_object_iter_t it = NULL, itseq = NULL; struct config_entry *temp_config; struct config_value *cv; @@ -638,7 +638,7 @@ static void parse_repo_file(ucl_object_t *obj) { ucl_object_iter_t it = NULL; - ucl_object_t *cur; + const ucl_object_t *cur; const char *key; while ((cur = ucl_iterate_object(obj, &it, true))) { @@ -683,7 +683,7 @@ read_conf_file(const char *confpath, pkg_conf_file_t conftype) parse_repo_file(obj); } - ucl_object_free(obj); + ucl_object_unref(obj); ucl_parser_free(p); return (0); |