remove containers holding only default values
This commit is contained in:
parent
38f501be19
commit
42d5b6fba2
2 changed files with 36 additions and 6 deletions
|
|
@ -498,10 +498,12 @@ with_defaults(cxobj *xe,
|
|||
/* Mark state nodes */
|
||||
if (xml_non_config_data(xret, NULL) < 0)
|
||||
goto done;
|
||||
/* Remove default configuration nodes*/
|
||||
/* Remove default configuration nodes */
|
||||
if (xml_tree_prune_flags(xret, XML_FLAG_DEFAULT, XML_FLAG_MARK | XML_FLAG_DEFAULT) < 0)
|
||||
goto done;
|
||||
/* TODO. Remove empty containers */
|
||||
/* Remove empty containers */
|
||||
if (xml_defaults_nopresence(xret, 1) < 0)
|
||||
goto done;
|
||||
goto ok;
|
||||
}
|
||||
if (strcmp(mode, "trim") == 0) {
|
||||
|
|
@ -514,7 +516,9 @@ with_defaults(cxobj *xe,
|
|||
if (xml_tree_prune_flags(xret, XML_FLAG_MARK, XML_FLAG_MARK)
|
||||
< 0)
|
||||
goto done;
|
||||
/* TODO. Remove empty containers */
|
||||
/* Remove empty containers */
|
||||
if (xml_defaults_nopresence(xret, 1) < 0)
|
||||
goto done;
|
||||
goto ok;
|
||||
}
|
||||
if (strcmp(mode, "report-all-tagged") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue