commit | ef53c81884cfc1b316054a9461c8e26ef36eda17 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Oct 13 10:21:03 2021 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Wed Oct 13 10:21:03 2021 +0200 |
tree | 5122965932b0054d80487a2f9e78a53fd1265b70 | |
parent | 9facb4054aeea4343b9bab4d3008360019a63b12 [diff] [blame] |
tree schema FEATURE schema node module owner func
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c index 0dbfefa..67076b6 100644 --- a/src/tree_schema_helpers.c +++ b/src/tree_schema_helpers.c
@@ -1222,6 +1222,17 @@ return NULL; } +API const struct lys_module * +lysc_owner_module(const struct lysc_node *node) +{ + if (!node) { + return NULL; + } + + for ( ; node->parent; node = node->parent) {} + return node->module; +} + API const char * lys_nodetype2str(uint16_t nodetype) {