diff --git a/lib/src/clixon_datastore_write.c b/lib/src/clixon_datastore_write.c index f31df7d0..fdfa1d2d 100644 --- a/lib/src/clixon_datastore_write.c +++ b/lib/src/clixon_datastore_write.c @@ -1433,6 +1433,8 @@ xmldb_multi_write_applyfn(cxobj *x, if (clixon_xml2file1(fsub, x, 0, mw->mw_pretty, NULL, fprintf, 1, 0, mw->mw_wdef, 0) < 0) goto done; } + retval = 2; /* Locally abort */ + goto done; } } retval = 0; @@ -1482,11 +1484,8 @@ xmldb_dump(clixon_handle h, if ((xm = clicon_modst_cache_get(h, 1)) != NULL){ if ((xmodst = xml_dup(xm)) == NULL) goto done; - /* There are two views on where to insert modstate in config: first or last - * Request from user for last - */ #if 1 - /* This is inserted last in config */ + /* This is inserted last in config, seems preferred */ if (xml_addsub(xt, xmodst) < 0) goto done; #else @@ -1531,7 +1530,6 @@ xmldb_dump(clixon_handle h, return retval; } - /*! Given datastore, get cache and format, set wdef, add modstate and print to multiple files * * Also add mod-state if applicable diff --git a/yang/clixon/clixon-config@2024-04-01.yang b/yang/clixon/clixon-config@2024-04-01.yang index f4f3a880..8cf246e6 100644 --- a/yang/clixon/clixon-config@2024-04-01.yang +++ b/yang/clixon/clixon-config@2024-04-01.yang @@ -1006,7 +1006,11 @@ module clixon-config { type string; mandatory true; description - "Directory where \"running\", \"candidate\" and \"startup\" are placed."; + "Directory where datastores such as \"running\", \"candidate\" and \"startup\" + are placed. + If CLICON_XMLDB_MULTI is enabled, this is the directory where a datastore + subdir is stored, such as \"running.d/\" + "; } leaf CLICON_DATASTORE_CACHE {