libyang REFACTOR return values and options changes
Unified, all functions that return a variety
of errors return LY_ERR. Any options such as
NOSIBLINGS, WITHSIBLINGS and so on were replaced
by function variants with suffixes _single, _all,
_tree, and _siblings.
diff --git a/tools/lint/commands.c b/tools/lint/commands.c
index dce7a5d..0030203 100644
--- a/tools/lint/commands.c
+++ b/tools/lint/commands.c
@@ -231,7 +231,7 @@
dir = strdup(path);
ly_ctx_set_searchdir(ctx, dirname(dir));
- model = lys_parse_path(ctx, path, format);
+ lys_parse_path(ctx, path, format, &model);
ly_ctx_unset_searchdir(ctx, index);
free(path);
free(dir);
@@ -822,7 +822,7 @@
}
if (outformat) {
- ret = lyd_print(out, data, outformat, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_FORMAT | printopt);
+ ret = lyd_print_all(out, data, outformat, LYD_PRINT_FORMAT | printopt);
ret = ret < 0 ? ret * (-1) : 0;
}
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index 202fff5..3eef135 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -704,7 +704,7 @@
}
dir = strdup(argv[optind + i]);
ly_ctx_set_searchdir(ctx, ptr = dirname(dir));
- mod = lys_parse_path(ctx, argv[optind + i], informat_s);
+ lys_parse_path(ctx, argv[optind + i], informat_s, &mod);
ly_ctx_unset_searchdir(ctx, index);
free(dir);
if (!mod) {
@@ -1067,7 +1067,7 @@
}
}
#endif
- lyd_print(out, data_item->tree, outformat_d, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_FORMAT /* TODO defaults | options_dflt */);
+ lyd_print_all(out, data_item->tree, outformat_d, LYD_PRINT_FORMAT /* TODO defaults | options_dflt */);
#if 0
if (envelope_s) {
if (data_item->type == LYD_OPT_RPC && data_item->tree->schema->nodetype != LYS_RPC) {