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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_profile, xp_header)==0)
 
static bool profile_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_profile, M0_CONF_PROFILE_MAGIC, profile_check)
 
 M0_CONF__INVARIANT_DEFINE (profile_invariant, m0_conf_profile)
 
static int profile_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int profile_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool profile_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static void profile_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (profile_create, m0_conf_profile, &profile_ops)
 

Variables

static const struct m0_conf_obj_ops profile_ops
 
const struct m0_conf_obj_type M0_CONF_PROFILE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file profile.c.

◆ XCAST

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

Definition at line 29 of file profile.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_profile, xp_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_profile  ,
M0_CONF_PROFILE_MAGIC  ,
profile_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( profile_create  ,
m0_conf_profile  ,
profile_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( profile_invariant  ,
m0_conf_profile   
)

◆ profile_check()

static bool profile_check ( const void *  bob)
static

Definition at line 32 of file profile.c.

Here is the call graph for this function:

◆ profile_decode()

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

Definition at line 46 of file profile.c.

Here is the call graph for this function:

◆ profile_delete()

static void profile_delete ( struct m0_conf_obj obj)
static

Definition at line 76 of file profile.c.

Here is the call graph for this function:

◆ profile_encode()

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

Definition at line 57 of file profile.c.

Here is the call graph for this function:

◆ profile_match()

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

Definition at line 68 of file profile.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_PROFILE_TYPE

const struct m0_conf_obj_type M0_CONF_PROFILE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__PROFILE_FT_ID,
.ft_name = "conf_profile"
},
.cot_create = &profile_create,
.cot_xt = &m0_confx_profile_xc,
.cot_branch = "u_profile",
.cot_xc_init = &m0_xc_m0_confx_profile_struct_init,
.cot_magic = M0_CONF_PROFILE_MAGIC
}

Definition at line 97 of file profile.c.

◆ profile_ops

const struct m0_conf_obj_ops profile_ops
static
Initial value:
= {
.coo_invariant = profile_invariant,
.coo_decode = profile_decode,
.coo_encode = profile_encode,
.coo_match = profile_match,
.coo_lookup = conf_obj_lookup_denied,
.coo_readdir = NULL,
.coo_downlinks = conf_obj_downlinks_none,
.coo_delete = profile_delete
}
M0_INTERNAL const struct m0_fid ** conf_obj_downlinks_none(const struct m0_conf_obj *obj)
Definition: common.c:226
static int profile_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: profile.c:46
#define NULL
Definition: misc.h:38
M0_INTERNAL int conf_obj_lookup_denied(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: common.c:217
static int profile_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: profile.c:57
static bool profile_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: profile.c:68
static void profile_delete(struct m0_conf_obj *obj)
Definition: profile.c:76

Definition at line 84 of file profile.c.