Skip to content

Commit be136f6

Browse files
committed
log CHANGE print information about module implemented status
1 parent ddac622 commit be136f6

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

src/parser_yang.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2665,7 +2665,8 @@ yang_read_module(struct ly_ctx *ctx, const char* data, unsigned int size, const
26652665

26662666
unres_schema_free(NULL, &unres, 0);
26672667
lyp_check_circmod_pop(ctx);
2668-
LOGVRB("Module \"%s\" successfully parsed.", module->name);
2668+
LOGVRB("Module \"%s%s%s\" successfully parsed as %s.", module->name, (module->rev_size ? "@" : ""),
2669+
(module->rev_size ? module->rev[0].date : ""), (module->implemented ? "implemented" : "imported"));
26692670
return module;
26702671

26712672
error:

src/parser_yin.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7218,7 +7218,8 @@ yin_read_module_(struct ly_ctx *ctx, struct lyxml_elem *yin, const char *revisio
72187218

72197219
unres_schema_free(NULL, &unres, 0);
72207220
lyp_check_circmod_pop(ctx);
7221-
LOGVRB("Module \"%s\" successfully parsed.", module->name);
7221+
LOGVRB("Module \"%s%s%s\" successfully parsed as %s.", module->name, (module->rev_size ? "@" : ""),
7222+
(module->rev_size ? module->rev[0].date : ""), (module->implemented ? "implemented" : "imported"));
72227223
return module;
72237224

72247225
error:

src/resolve.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6283,7 +6283,7 @@ resolve_unres_schema_item(struct lys_module *mod, void *item, enum UNRES_ITEM ty
62836283
struct unres_schema *unres)
62846284
{
62856285
/* has_str - whether the str_snode is a string in a dictionary that needs to be freed */
6286-
int rc = -1, has_str = 0, parent_type = 0, i, k;
6286+
int rc = -1, has_str = 0, parent_type = 0, i, k, hidden;
62876287
unsigned int j;
62886288
struct lys_node *root, *next, *node, *par_grp;
62896289
const char *expr;
@@ -6331,7 +6331,12 @@ resolve_unres_schema_item(struct lys_module *mod, void *item, enum UNRES_ITEM ty
63316331
}
63326332

63336333
if (lys_node_module(node)->implemented) {
6334-
/* make all the modules on the path implemented */
6334+
/* make all the modules on the path implemented, print verbose messages */
6335+
hidden = ly_vlog_hidden;
6336+
if (hidden) {
6337+
ly_vlog_hide(0);
6338+
}
6339+
63356340
for (next = (struct lys_node *)stype->info.lref.target; next; next = lys_parent(next)) {
63366341
if (!lys_node_module(next)->implemented) {
63376342
if (lys_set_implemented(lys_node_module(next))) {
@@ -6348,6 +6353,14 @@ resolve_unres_schema_item(struct lys_module *mod, void *item, enum UNRES_ITEM ty
63486353
if (lys_leaf_add_leafref_target(stype->info.lref.target, (struct lys_node *)stype->parent)) {
63496354
rc = -1;
63506355
}
6356+
6357+
if (hidden) {
6358+
ly_vlog_hide(1);
6359+
}
6360+
6361+
if (rc) {
6362+
break;
6363+
}
63516364
}
63526365
}
63536366

src/tree_schema.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4004,7 +4004,6 @@ apply_aug(struct lys_node_augment *augment, struct unres_schema *unres)
40044004
LOGERR(ly_errno, "Making the augment target module \"%s\" implemented failed.", lys_node_module(parent)->name);
40054005
return -1;
40064006
}
4007-
LOGVRB("Augment target module \"%s\" now implemented.", lys_node_module(parent)->name);
40084007
}
40094008
}
40104009

@@ -4519,6 +4518,8 @@ lys_set_implemented(const struct lys_module *module)
45194518
module->inc[i].submodule->implemented = 1;
45204519
}
45214520

4521+
LOGVRB("Module \"%s%s%s\" now implemented.", module->name, (module->rev_size ? "@" : ""),
4522+
(module->rev_size ? module->rev[0].date : ""));
45224523
return EXIT_SUCCESS;
45234524

45244525
error:

0 commit comments

Comments
 (0)