Structural C-code change: Merged yang_spec and yang_node types into yang_stmt
This commit is contained in:
parent
4f9e942103
commit
b5f1f7346e
52 changed files with 492 additions and 496 deletions
|
|
@ -163,7 +163,7 @@ backend_client_rm(clicon_handle h,
|
|||
*/
|
||||
static int
|
||||
client_get_streams(clicon_handle h,
|
||||
yang_spec *yspec,
|
||||
yang_stmt *yspec,
|
||||
char *xpath,
|
||||
char *module,
|
||||
char *top,
|
||||
|
|
@ -175,11 +175,11 @@ client_get_streams(clicon_handle h,
|
|||
cxobj *x = NULL;
|
||||
cbuf *cb = NULL;
|
||||
|
||||
if ((ystream = yang_find((yang_node*)yspec, Y_MODULE, module)) == NULL){
|
||||
if ((ystream = yang_find(yspec, Y_MODULE, module)) == NULL){
|
||||
clicon_err(OE_YANG, 0, "%s yang module not found", module);
|
||||
goto done;
|
||||
}
|
||||
if ((yns = yang_find((yang_node*)ystream, Y_NAMESPACE, NULL)) == NULL){
|
||||
if ((yns = yang_find(ystream, Y_NAMESPACE, NULL)) == NULL){
|
||||
clicon_err(OE_YANG, 0, "%s yang namespace not found", module);
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ client_statedata(clicon_handle h,
|
|||
cxobj **xvec = NULL;
|
||||
size_t xlen;
|
||||
int i;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
|
||||
if ((yspec = clicon_dbspec_yang(h)) == NULL){
|
||||
clicon_err(OE_YANG, ENOENT, "No yang spec");
|
||||
|
|
@ -379,7 +379,7 @@ from_client_edit_config(clicon_handle h,
|
|||
enum operation_type operation = OP_MERGE;
|
||||
int piddb;
|
||||
int non_config = 0;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
cbuf *cbx = NULL; /* Assist cbuf */
|
||||
int ret;
|
||||
char *username;
|
||||
|
|
@ -1061,7 +1061,7 @@ from_client_msg(clicon_handle h,
|
|||
cbuf *cbret = NULL; /* return message */
|
||||
int ret;
|
||||
char *username;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
yang_stmt *ye;
|
||||
yang_stmt *ymod;
|
||||
cxobj *xnacm = NULL;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
* @retval 1 Validation OK
|
||||
*/
|
||||
static int
|
||||
generic_validate(yang_spec *yspec,
|
||||
generic_validate(yang_stmt *yspec,
|
||||
transaction_data_t *td,
|
||||
cbuf *cbret)
|
||||
{
|
||||
|
|
@ -168,7 +168,7 @@ startup_common(clicon_handle h,
|
|||
cbuf *cbret)
|
||||
{
|
||||
int retval = -1;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
int ret;
|
||||
modstate_diff_t *msd = NULL;
|
||||
cxobj *xt = NULL;
|
||||
|
|
@ -341,7 +341,7 @@ from_validate_common(clicon_handle h,
|
|||
cbuf *cbret)
|
||||
{
|
||||
int retval = -1;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
int i;
|
||||
cxobj *xn;
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
static int
|
||||
backend_terminate(clicon_handle h)
|
||||
{
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
char *pidfile = clicon_backend_pidfile(h);
|
||||
int sockfamily = clicon_sock_family(h);
|
||||
char *sockpath = clicon_sock(h);
|
||||
|
|
@ -174,7 +174,7 @@ nacm_load_external(clicon_handle h)
|
|||
{
|
||||
int retval = -1;
|
||||
char *filename; /* NACM config file */
|
||||
yang_spec *yspec = NULL;
|
||||
yang_stmt *yspec = NULL;
|
||||
cxobj *xt = NULL;
|
||||
struct stat st;
|
||||
FILE *f = NULL;
|
||||
|
|
@ -325,8 +325,8 @@ main(int argc,
|
|||
int sockfamily;
|
||||
char *nacm_mode;
|
||||
int logdst = CLICON_LOG_SYSLOG|CLICON_LOG_STDERR;
|
||||
yang_spec *yspec = NULL;
|
||||
yang_spec *yspecfg = NULL; /* For config XXX clixon bug */
|
||||
yang_stmt *yspec = NULL;
|
||||
yang_stmt *yspecfg = NULL; /* For config XXX clixon bug */
|
||||
char *str;
|
||||
int ss = -1; /* server socket */
|
||||
cbuf *cbret = NULL; /* startup cbuf if invalid */
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ clixon_plugin_reset(clicon_handle h,
|
|||
*/
|
||||
int
|
||||
clixon_plugin_statedata(clicon_handle h,
|
||||
yang_spec *yspec,
|
||||
yang_stmt *yspec,
|
||||
char *xpath,
|
||||
cxobj **xret)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int backend_plugin_initiate(clicon_handle h);
|
|||
|
||||
int clixon_plugin_reset(clicon_handle h, char *db);
|
||||
|
||||
int clixon_plugin_statedata(clicon_handle h, yang_spec *yspec, char *xpath, cxobj **xtop);
|
||||
int clixon_plugin_statedata(clicon_handle h, yang_stmt *yspec, char *xpath, cxobj **xtop);
|
||||
transaction_data_t * transaction_new(void);
|
||||
int transaction_free(transaction_data_t *);
|
||||
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ startup_failsafe(clicon_handle h)
|
|||
*/
|
||||
int
|
||||
startup_module_state(clicon_handle h,
|
||||
yang_spec *yspec)
|
||||
yang_stmt *yspec)
|
||||
{
|
||||
int retval = -1;
|
||||
cxobj *x = NULL;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,6 @@ int startup_db_reset(clicon_handle h, char *db);
|
|||
int startup_mode_startup(clicon_handle h, char *db, cbuf *cbret);
|
||||
int startup_extraxml(clicon_handle h, char *file, cbuf *cbret);
|
||||
int startup_failsafe(clicon_handle h);
|
||||
int startup_module_state(clicon_handle h, yang_spec *yspec);
|
||||
int startup_module_state(clicon_handle h, yang_stmt *yspec);
|
||||
|
||||
#endif /* _BACKEND_STARTUP_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue