New plugin callback: ca_yang_patch - for modifying existing YANG modules

C-API: Added `spec` parameter to `xml2xpath()`
This commit is contained in:
Olof Hagsand 2023-02-05 11:09:06 +01:00
parent 48a0fb9968
commit a5220805b1
16 changed files with 318 additions and 193 deletions

View file

@ -132,7 +132,7 @@ main(int argc,
if (yang_filename){
if ((yspec = yspec_new()) == NULL)
goto done;
if (yang_parse_filename(yang_filename, yspec) == NULL){
if (yang_parse_filename(NULL, yang_filename, yspec) == NULL){
fprintf(stderr, "yang parse error %s\n", clicon_err_reason);
return -1;
}

View file

@ -383,7 +383,7 @@ main(int argc,
char *xpathi = NULL;
for (i=0; i<xc->xc_size; i++){
xi = xc->xc_nodeset[i];
if (xml2xpath(xi, nsc, &xpathi) < 0)
if (xml2xpath(xi, nsc, 0, &xpathi) < 0)
goto done;
fprintf(stdout, "Inverse: %s\n", xpathi);
if (xpathi){