Restructured error,debug anf log API
Renamed functions clicon->clixon, replaced global variables w access functions Unified clicon_netconf_error with clixon_err()
This commit is contained in:
parent
261469be16
commit
24a4991ec8
199 changed files with 4668 additions and 4158 deletions
|
|
@ -55,12 +55,13 @@
|
|||
|
||||
#include <cligen/cligen.h>
|
||||
|
||||
/* clicon */
|
||||
/* clixon */
|
||||
#include "clixon_queue.h"
|
||||
#include "clixon_hash.h"
|
||||
#include "clixon_handle.h"
|
||||
#include "clixon_err.h"
|
||||
#include "clixon_log.h"
|
||||
#include "clixon_debug.h"
|
||||
#include "clixon_yang.h"
|
||||
#include "clixon_options.h"
|
||||
#include "clixon_regex.h"
|
||||
|
|
@ -245,7 +246,7 @@ regexp_xsd2posix(char *xsd,
|
|||
size_t len;
|
||||
|
||||
if ((cb = cbuf_new()) == NULL){
|
||||
clicon_err(OE_UNIX, errno, "cbuf_new");
|
||||
clixon_err(OE_UNIX, errno, "cbuf_new");
|
||||
goto done;
|
||||
}
|
||||
esc=0;
|
||||
|
|
@ -357,7 +358,7 @@ regexp_xsd2posix(char *xsd,
|
|||
cprintf(cb, "%c", x);
|
||||
}
|
||||
if ((*posix = strdup(cbuf_get(cb))) == NULL){
|
||||
clicon_err(OE_UNIX, errno, "strdup");
|
||||
clixon_err(OE_UNIX, errno, "strdup");
|
||||
goto done;
|
||||
}
|
||||
retval = 0;
|
||||
|
|
@ -382,7 +383,7 @@ regexp_xsd2posix(char *xsd,
|
|||
* translate from XSD to POSIX.
|
||||
*/
|
||||
int
|
||||
regex_compile(clicon_handle h,
|
||||
regex_compile(clixon_handle h,
|
||||
char *regexp,
|
||||
void **recomp)
|
||||
{
|
||||
|
|
@ -399,7 +400,7 @@ regex_compile(clicon_handle h,
|
|||
retval = cligen_regex_libxml2_compile(regexp, recomp);
|
||||
break;
|
||||
default:
|
||||
clicon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d", clicon_yang_regexp(h));
|
||||
clixon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d", clicon_yang_regexp(h));
|
||||
break;
|
||||
}
|
||||
/* retval from fns above */
|
||||
|
|
@ -418,7 +419,7 @@ regex_compile(clicon_handle h,
|
|||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
regex_exec(clicon_handle h,
|
||||
regex_exec(clixon_handle h,
|
||||
void *recomp,
|
||||
char *string)
|
||||
{
|
||||
|
|
@ -432,7 +433,7 @@ regex_exec(clicon_handle h,
|
|||
retval = cligen_regex_libxml2_exec(recomp, string);
|
||||
break;
|
||||
default:
|
||||
clicon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d",
|
||||
clixon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d",
|
||||
clicon_yang_regexp(h));
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -449,7 +450,7 @@ regex_exec(clicon_handle h,
|
|||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
regex_free(clicon_handle h,
|
||||
regex_free(clixon_handle h,
|
||||
void *recomp)
|
||||
{
|
||||
int retval = -1;
|
||||
|
|
@ -462,7 +463,7 @@ regex_free(clicon_handle h,
|
|||
retval = cligen_regex_libxml2_free(recomp);
|
||||
break;
|
||||
default:
|
||||
clicon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d", clicon_yang_regexp(h));
|
||||
clixon_err(OE_CFG, 0, "clicon_yang_regexp invalid value: %d", clicon_yang_regexp(h));
|
||||
goto done;
|
||||
}
|
||||
/* retval from fns above */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue