Motr  M0
finject_init.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <err.h>
#include <yaml.h>
#include "lib/memory.h"
#include "lib/mutex.h"
#include "lib/time.h"
#include "lib/string.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/finject_internal.h"
Include dependency graph for finject_init.c:

Go to the source code of this file.

Enumerations

enum  { FI_RAND_PROB_SCALE = 100 }
 

Functions

M0_INTERNAL int m0_fi_init (void)
 
M0_INTERNAL void m0_fi_fini (void)
 
M0_INTERNAL uint32_t fi_random (void)
 
M0_INTERNAL void m0_fi_print_info (void)
 
M0_INTERNAL int m0_fi_enable_fault_point (const char *str)
 
static const char * pair_key (yaml_document_t *doc, yaml_node_pair_t *pair)
 
static const char * pair_val (yaml_document_t *doc, yaml_node_pair_t *pair)
 
static int extract_fpoint_data (yaml_document_t *doc, yaml_node_t *node, const char **func, const char **tag, struct m0_fi_fpoint_data *data)
 
static int process_yaml (yaml_document_t *doc)
 
M0_INTERNAL int m0_fi_enable_fault_points_from_file (const char *file_name)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FI_RAND_PROB_SCALE 

Definition at line 66 of file finject_init.c.

Function Documentation

◆ extract_fpoint_data()

static int extract_fpoint_data ( yaml_document_t *  doc,
yaml_node_t *  node,
const char **  func,
const char **  tag,
struct m0_fi_fpoint_data data 
)
static

Definition at line 202 of file finject_init.c.

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

◆ fi_random()

M0_INTERNAL uint32_t fi_random ( void  )

Returns random value in range [0..FI_RAND_PROB_SCALE]

Definition at line 73 of file finject_init.c.

Here is the caller graph for this function:

◆ pair_key()

static const char* pair_key ( yaml_document_t *  doc,
yaml_node_pair_t *  pair 
)
inlinestatic

Definition at line 192 of file finject_init.c.

Here is the caller graph for this function:

◆ pair_val()

static const char* pair_val ( yaml_document_t *  doc,
yaml_node_pair_t *  pair 
)
inlinestatic

Definition at line 197 of file finject_init.c.

Here is the caller graph for this function:

◆ process_yaml()

static int process_yaml ( yaml_document_t *  doc)
static

Definition at line 238 of file finject_init.c.

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