Motr  M0
root.c File Reference
#include "lib/trace.h"
#include "lib/string.h"
#include "conf/objs/common.h"
#include "conf/onwire_xc.h"
#include "motr/magic.h"
Include dependency graph for root.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 
#define XCAST(xobj)   ((struct m0_confx_root *)(&(xobj)->xo_u))
 

Functions

 M0_BASSERT (offsetof(struct m0_confx_root, xt_header)==0)
 
static bool root_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_root, M0_CONF_ROOT_MAGIC, root_check)
 
 M0_CONF__INVARIANT_DEFINE (root_invariant, m0_conf_root)
 
static int root_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int root_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool root_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int root_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** root_downlinks (const struct m0_conf_obj *obj)
 
static void root_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (root_create, m0_conf_root, &root_ops)
 

Variables

static const struct m0_conf_obj_ops root_ops
 
const struct m0_conf_obj_type M0_CONF_ROOT_TYPE
 
const struct m0_fid M0_CONF_ROOT_FID = M0_FID_TINIT(M0_CONF__ROOT_FT_ID, 1, 0)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file root.c.

◆ XCAST

#define XCAST (   xobj)    ((struct m0_confx_root *)(&(xobj)->xo_u))

Definition at line 30 of file root.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_root, xt_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_root  ,
M0_CONF_ROOT_MAGIC  ,
root_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( root_create  ,
m0_conf_root  ,
root_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( root_invariant  ,
m0_conf_root   
)

◆ root_check()

static bool root_check ( const void *  bob)
static

Definition at line 33 of file root.c.

Here is the call graph for this function:

◆ root_decode()

static int root_decode ( struct m0_conf_obj dest,
const struct m0_confx_obj src 
)
static

Definition at line 49 of file root.c.

Here is the call graph for this function:

◆ root_delete()

static void root_delete ( struct m0_conf_obj obj)
static

Definition at line 192 of file root.c.

Here is the call graph for this function:

◆ root_downlinks()

static const struct m0_fid** root_downlinks ( const struct m0_conf_obj obj)
static

Definition at line 177 of file root.c.

Here is the call graph for this function:

◆ root_encode()

static int root_encode ( struct m0_confx_obj dest,
const struct m0_conf_obj src 
)
static
Todo:
Make spiel happy for now as it does not know about fdmi yet.

Definition at line 102 of file root.c.

Here is the call graph for this function:

◆ root_lookup()

static int root_lookup ( const struct m0_conf_obj parent,
const struct m0_fid name,
struct m0_conf_obj **  out 
)
static

Definition at line 160 of file root.c.

Here is the call graph for this function:

◆ root_match()

static bool root_match ( const struct m0_conf_obj cached,
const struct m0_confx_obj flat 
)
static

Definition at line 141 of file root.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_ROOT_TYPE

const struct m0_conf_obj_type M0_CONF_ROOT_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__ROOT_FT_ID,
.ft_name = "conf_root"
},
.cot_create = &root_create,
.cot_xt = &m0_confx_root_xc,
.cot_branch = "u_root",
.cot_xc_init = &m0_xc_m0_confx_root_struct_init,
.cot_magic = M0_CONF_ROOT_MAGIC
}

Definition at line 214 of file root.c.

◆ root_ops

const struct m0_conf_obj_ops root_ops
static
Initial value:
= {
.coo_invariant = root_invariant,
.coo_decode = root_decode,
.coo_encode = root_encode,
.coo_match = root_match,
.coo_lookup = root_lookup,
.coo_readdir = NULL,
.coo_downlinks = root_downlinks,
.coo_delete = root_delete
}
#define NULL
Definition: misc.h:38
static void root_delete(struct m0_conf_obj *obj)
Definition: root.c:192
static const struct m0_fid ** root_downlinks(const struct m0_conf_obj *obj)
Definition: root.c:177
static int root_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: root.c:102
static int root_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: root.c:160
static int root_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: root.c:49
static bool root_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: root.c:141

Definition at line 201 of file root.c.