yanglint UPDATE choise/case completion
yanglint print -f info -P now supports choice and case schema nodes.
diff --git a/tools/lint/cmd_print.c b/tools/lint/cmd_print.c
index 2702fbf..c1a5359 100644
--- a/tools/lint/cmd_print.c
+++ b/tools/lint/cmd_print.c
@@ -243,15 +243,12 @@
if (node_path) {
const struct lysc_node *node;
- node = lys_find_path(*ctx, NULL, node_path, 0);
+ node = find_schema_path(*ctx, node_path);
if (!node) {
- node = lys_find_path(*ctx, NULL, node_path, 1);
-
- if (!node) {
- YLMSG_E("The requested schema node \"%s\" does not exists.\n", node_path);
- goto cleanup;
- }
+ YLMSG_E("The requested schema node \"%s\" does not exists.\n", node_path);
+ goto cleanup;
}
+
if (lys_print_node(out, node, format, 0, options_print)) {
YLMSG_E("Unable to print schema node %s.\n", node_path);
goto cleanup;