lyb FEATURE less metadata for list node
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 10fea3f..fb395c9 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -1086,6 +1086,47 @@
}
/**
+ * @brief Print all list nodes which belong to same schema.
+ *
+ * @param[in] out Out structure.
+ * @param[in] node Current data node to print.
+ * @param[in] lybctx LYB context.
+ * @param[out] printed_node Last node that was printed by this function.
+ * @return LY_ERR value.
+ */
+static LY_ERR
+lyb_print_node_list(struct ly_out *out, const struct lyd_node *node, struct lyd_lyb_ctx *lybctx,
+ const struct lyd_node **printed_node)
+{
+ const struct lysc_node *schema;
+
+ /* register a new sibling */
+ LY_CHECK_RET(lyb_write_start_siblings(out, lybctx->lybctx));
+
+ schema = node->schema;
+
+ LY_LIST_FOR(node, node) {
+ if (schema != node->schema) {
+ /* all list nodes was printed */
+ break;
+ }
+
+ /* write necessary basic data */
+ LY_CHECK_RET(lyb_print_node_header(out, node, lybctx));
+
+ /* recursively write all the descendants */
+ LY_CHECK_RET(lyb_print_siblings(out, lyd_child(node), lybctx));
+
+ *printed_node = node;
+ }
+
+ /* finish this sibling */
+ LY_CHECK_RET(lyb_write_stop_siblings(out, lybctx->lybctx));
+
+ return LY_SUCCESS;
+}
+
+/**
* @brief Print siblings.
*
* @param[in] out Out structure.
@@ -1133,6 +1174,8 @@
LY_CHECK_RET(lyb_print_node_opaq(out, (struct lyd_node_opaq *)node, lybctx));
} else if (node->schema->nodetype & LYS_LEAFLIST) {
LY_CHECK_RET(lyb_print_node_leaflist(out, node, lybctx, &node));
+ } else if (node->schema->nodetype == LYS_LIST) {
+ LY_CHECK_RET(lyb_print_node_list(out, node, lybctx, &node));
} else if (node->schema->nodetype & LYD_NODE_ANY) {
LY_CHECK_RET(lyb_print_node_any(out, (struct lyd_node_any *)node, lybctx));
} else if (node->schema->nodetype & LYD_NODE_INNER) {