Motr  M0
Console_yaml

Data Structures

struct  m0_cons_yaml_info
 Keeps info for YAML parser. More...
 

Functions

M0_INTERNAL int m0_cons_yaml_init (const char *path)
 Inititalizes parser by opening given file. and also checks for error by getting root node. More...
 
M0_INTERNAL void m0_cons_yaml_fini (void)
 Deletes the parser and closes the YAML file. More...
 
static yaml_node_t * search_node (const char *name)
 
M0_INTERNAL void * m0_cons_yaml_get_value (const char *value)
 Search for specified string and set the respctive value form YAML file. (like "name : console") More...
 
M0_INTERNAL int m0_cons_yaml_set_value (const char *value, void *data)
 Search for specified string and get the respctive value form YAML file. (like "name : console") More...
 

Variables

static struct m0_cons_yaml_info yaml_info
 
M0_INTERNAL bool yaml_support
 
M0_EXTERN bool yaml_support
 

Detailed Description

Function Documentation

◆ m0_cons_yaml_fini()

M0_INTERNAL void m0_cons_yaml_fini ( void  )

Deletes the parser and closes the YAML file.

Definition at line 147 of file console_yaml.c.

Here is the caller graph for this function:

◆ m0_cons_yaml_get_value()

M0_INTERNAL void * m0_cons_yaml_get_value ( const char *  value)

Search for specified string and set the respctive value form YAML file. (like "name : console")

Parameters
valueSearch string (like name).
Returns
0 success and -errno failure.

Definition at line 177 of file console_yaml.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cons_yaml_init()

M0_INTERNAL int m0_cons_yaml_init ( const char *  path)

Inititalizes parser by opening given file. and also checks for error by getting root node.

Parameters
pathYAML file path.
Returns
0 success and -errno failure.

Definition at line 94 of file console_yaml.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cons_yaml_set_value()

M0_INTERNAL int m0_cons_yaml_set_value ( const char *  value,
void *  data 
)

Search for specified string and get the respctive value form YAML file. (like "name : console")

Parameters
valueSearch string (like name).
dataRespective data (like console).
Returns
0 success and -errno failure.

Definition at line 183 of file console_yaml.c.

Here is the call graph for this function:

◆ search_node()

static yaml_node_t* search_node ( const char *  name)
static

Definition at line 155 of file console_yaml.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ yaml_info

struct m0_cons_yaml_info yaml_info
static

Definition at line 90 of file console_yaml.c.

◆ yaml_support [1/2]

M0_EXTERN bool yaml_support

enable/disable yaml support

Definition at line 40 of file console_yaml.h.

◆ yaml_support [2/2]

M0_INTERNAL bool yaml_support

enable/disable yaml support

Definition at line 92 of file console_yaml.c.