From 5e02643a64fb6aaaf95f6f9049020f392b5563d5 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 2 Nov 2018 21:57:20 -0200 Subject: lib: make it possible to create YANG data nodes containing state data By default the data nodes created by yang_dnode_new() could contain only configuration data (LYD_OPT_CONFIG). Add a 'config_only' option to yang_dnode_new() so that it can create data nodes containing both configuration and state data. Signed-off-by: Renato Westphal --- lib/yang_translator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/yang_translator.c') diff --git a/lib/yang_translator.c b/lib/yang_translator.c index 27b92a0e6b..c41a8f3eea 100644 --- a/lib/yang_translator.c +++ b/lib/yang_translator.c @@ -351,7 +351,7 @@ int yang_translate_dnode(const struct yang_translator *translator, int dir, ly_ctx = ly_native_ctx; else ly_ctx = translator->ly_ctx; - new = yang_dnode_new(ly_ctx); + new = yang_dnode_new(ly_ctx, false); /* Iterate over all nodes from the data tree. */ LY_TREE_FOR (*dnode, root) { -- cgit v1.2.3