Fixed show mem total yang output
Fixed log message for mount error
This commit is contained in:
parent
dfe5c1bac1
commit
911594ead1
4 changed files with 7 additions and 5 deletions
|
|
@ -2008,7 +2008,7 @@ cli_show_statistics(clixon_handle h,
|
||||||
cligen_output(stdout, "YANG-total-nr: %" PRIu64 "\n", sz);
|
cligen_output(stdout, "YANG-total-nr: %" PRIu64 "\n", sz);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
translatenumber(sz, &u64, &unit);
|
translatenumber(tsz, &u64, &unit);
|
||||||
cligen_output(stdout, "%-25s %" PRIu64 "%-10s\n", "YANG Total", u64, unit);
|
cligen_output(stdout, "%-25s %" PRIu64 "%-10s\n", "YANG Total", u64, unit);
|
||||||
}
|
}
|
||||||
tnr0 = tnr;
|
tnr0 = tnr;
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,6 @@ yang_stmt *yang_find_module_by_name_revision(yang_stmt *yspec, const char *name,
|
||||||
yang_stmt *yang_find_module_by_name(yang_stmt *yspec, char *name);
|
yang_stmt *yang_find_module_by_name(yang_stmt *yspec, char *name);
|
||||||
int yang_metadata_annotation_check(cxobj *x, yang_stmt *ymod, int *ismeta);
|
int yang_metadata_annotation_check(cxobj *x, yang_stmt *ymod, int *ismeta);
|
||||||
int yang_metadata_init(clixon_handle h);
|
int yang_metadata_init(clixon_handle h);
|
||||||
int yang_lib2yspec(clixon_handle h, cxobj *yanglib, yang_stmt *yspec);
|
int yang_lib2yspec(clixon_handle h, cxobj *yanglib, char *mntpnt, yang_stmt *yspec);
|
||||||
|
|
||||||
#endif /* _CLIXON_YANG_MODULE_H_ */
|
#endif /* _CLIXON_YANG_MODULE_H_ */
|
||||||
|
|
|
||||||
|
|
@ -852,6 +852,7 @@ yang_metadata_init(clixon_handle h)
|
||||||
* an XML mount-point.
|
* an XML mount-point.
|
||||||
* @param[in] h Clixon handle
|
* @param[in] h Clixon handle
|
||||||
* @param[in] xyanglib XML tree on the form <yang-lib>...
|
* @param[in] xyanglib XML tree on the form <yang-lib>...
|
||||||
|
* @param[in] mntpnt Name of mount-point for logs
|
||||||
* @param[in] yspec Will be populated with YANGs, is consumed
|
* @param[in] yspec Will be populated with YANGs, is consumed
|
||||||
* @retval 1 OK
|
* @retval 1 OK
|
||||||
* @retval 0 Parse error
|
* @retval 0 Parse error
|
||||||
|
|
@ -862,6 +863,7 @@ yang_metadata_init(clixon_handle h)
|
||||||
int
|
int
|
||||||
yang_lib2yspec(clixon_handle h,
|
yang_lib2yspec(clixon_handle h,
|
||||||
cxobj *xyanglib,
|
cxobj *xyanglib,
|
||||||
|
char *mntpnt,
|
||||||
yang_stmt *yspec)
|
yang_stmt *yspec)
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
|
|
@ -907,7 +909,7 @@ yang_lib2yspec(clixon_handle h,
|
||||||
(ymod = yang_find(yspec, Y_MODULE, name)) != NULL &&
|
(ymod = yang_find(yspec, Y_MODULE, name)) != NULL &&
|
||||||
(ns2 = yang_find_mynamespace(ymod)) != NULL &&
|
(ns2 = yang_find_mynamespace(ymod)) != NULL &&
|
||||||
strcmp(ns, ns2) != 0) {
|
strcmp(ns, ns2) != 0) {
|
||||||
clixon_log(h, LOG_WARNING, "Module:%s namespace mismatch %s vs %s", name, ns, ns2);
|
clixon_log(h, LOG_WARNING, "Mount:%s module %s namespace mismatch %s announced vs %s in loaded module", mntpnt, name, ns, ns2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef YANG_SCHEMA_MOUNT_YANG_LIB_FORCE
|
#ifdef YANG_SCHEMA_MOUNT_YANG_LIB_FORCE
|
||||||
|
|
|
||||||
|
|
@ -936,7 +936,7 @@ yang_schema_yanglib_parse_mount(clixon_handle h,
|
||||||
if ((yspec = yspec_new(h, xpath)) == NULL)
|
if ((yspec = yspec_new(h, xpath)) == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
clixon_debug(CLIXON_DBG_YANG, "new yang-spec: %p", yspec);
|
clixon_debug(CLIXON_DBG_YANG, "new yang-spec: %p", yspec);
|
||||||
if ((ret = yang_lib2yspec(h, xyanglib, yspec)) < 0)
|
if ((ret = yang_lib2yspec(h, xyanglib, xpath, yspec)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
goto anydata;
|
goto anydata;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue