minor fixes
This commit is contained in:
parent
9984cfa1c8
commit
101a8cb6e0
3 changed files with 20 additions and 6 deletions
|
|
@ -776,7 +776,7 @@ yang2cli_list(clicon_handle h,
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
char *helptext = NULL;
|
char *helptext = NULL;
|
||||||
char *s;
|
char *s;
|
||||||
int list_has_callback;
|
int list_has_callback = 0;
|
||||||
|
|
||||||
cprintf(cb, "%*s%s", level*3, "", yang_argument_get(ys));
|
cprintf(cb, "%*s%s", level*3, "", yang_argument_get(ys));
|
||||||
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
||||||
|
|
@ -836,9 +836,9 @@ yang2cli_list(clicon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
cprintf(cb, "%*s}\n", level*3, "");
|
cprintf(cb, "%*s}\n", level*3, "");
|
||||||
if ((show_tree == 1) && (list_has_callback)) {
|
if ((show_tree == 1) && (list_has_callback)) {
|
||||||
cprintf(cb, "%*s}\n", level*3, "");
|
cprintf(cb, "%*s}\n", level*3, "");
|
||||||
}
|
}
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
if (helptext)
|
if (helptext)
|
||||||
|
|
|
||||||
|
|
@ -399,6 +399,8 @@ example_statedata(clicon_handle h,
|
||||||
clicon_err(OE_UNIX, errno, "open(%s)", _state_file);
|
clicon_err(OE_UNIX, errno, "open(%s)", _state_file);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
if ((xt = xml_new("config", NULL, CX_ELMNT)) == NULL)
|
||||||
|
goto done;
|
||||||
if (clixon_xml_parse_file(fd, YB_MODULE, yspec, NULL, &xt, NULL) < 0)
|
if (clixon_xml_parse_file(fd, YB_MODULE, yspec, NULL, &xt, NULL) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
@ -417,7 +419,6 @@ example_statedata(clicon_handle h,
|
||||||
}
|
}
|
||||||
if (xml_copy(xt, xstate) < 0)
|
if (xml_copy(xt, xstate) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if (xvec){
|
if (xvec){
|
||||||
free(xvec);
|
free(xvec);
|
||||||
xvec = 0;
|
xvec = 0;
|
||||||
|
|
|
||||||
|
|
@ -234,8 +234,21 @@ yang_augment_node(yang_stmt *ys,
|
||||||
/* Find the target */
|
/* Find the target */
|
||||||
if (yang_abs_schema_nodeid(ysp, ys, schema_nodeid, -1, &ytarget) < 0)
|
if (yang_abs_schema_nodeid(ysp, ys, schema_nodeid, -1, &ytarget) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ytarget == NULL)
|
|
||||||
|
if (ytarget == NULL){
|
||||||
|
#if 0
|
||||||
|
clicon_err(OE_YANG, 0, "Augment failed in module %s: target node %s not found",
|
||||||
|
yang_argument_get(ys_module(ys)),
|
||||||
|
schema_nodeid);
|
||||||
|
goto done;
|
||||||
|
#else
|
||||||
|
clicon_log(LOG_WARNING, "Warning: Augment failed in module %s: target node %s not found",
|
||||||
|
yang_argument_get(ys_module(ys)),
|
||||||
|
schema_nodeid);
|
||||||
goto ok;
|
goto ok;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Find when statement, if present */
|
/* Find when statement, if present */
|
||||||
if ((ywhen = yang_find(ys, Y_WHEN, NULL)) != NULL){
|
if ((ywhen = yang_find(ys, Y_WHEN, NULL)) != NULL){
|
||||||
wxpath = yang_argument_get(ywhen);
|
wxpath = yang_argument_get(ywhen);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue