22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 26 #include "conf/onwire_xc.h" 30 #define XCAST(xobj) ((struct m0_confx_sdev *)(&(xobj)->xo_u)) 42 _0C(self->sd_filename !=
NULL));
74 d->xd_iface =
s->sd_iface;
75 d->xd_media =
s->sd_media;
91 return obj->sd_iface == xobj->xd_iface &&
92 obj->sd_media == xobj->xd_media &&
105 m0_conf_sdev_bob_fini(
x);
124 .
ft_id = M0_CONF__SDEV_FT_ID,
125 .ft_name =
"conf_sdev" 127 .cot_create = &sdev_create,
128 .cot_xt = &m0_confx_sdev_xc,
129 .cot_branch =
"u_sdev",
130 .cot_xc_init = &m0_xc_m0_confx_sdev_struct_init,
135 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
M0_INTERNAL const struct m0_fid ** conf_obj_downlinks_none(const struct m0_conf_obj *obj)
static void sdev_delete(struct m0_conf_obj *obj)
M0_INTERNAL bool m0_buf_streq(const struct m0_buf *buf, const char *str)
bool(* coo_invariant)(const struct m0_conf_obj *obj)
static const struct m0_conf_obj_ops sdev_ops
const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
static int sdev_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
M0_INTERNAL int conf_obj_lookup_denied(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
M0_BASSERT(offsetof(struct m0_confx_sdev, xd_header)==0)
static bool sdev_check(const void *bob)
M0_INTERNAL bool m0_conf_obj_is_stub(const struct m0_conf_obj *obj)
return M0_ERR(-EOPNOTSUPP)
const struct m0_fid_type cot_ftype
M0_CONF__CTOR_DEFINE(sdev_create, m0_conf_sdev, &sdev_ops)
M0_INTERNAL void confx_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
static bool sdev_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
#define M0_BUF_INITS(str)
struct m0_confx_header xd_header
#define M0_CONF_CAST(ptr, type)
M0_INTERNAL int m0_buf_copy(struct m0_buf *dest, const struct m0_buf *src)
M0_INTERNAL char * m0_buf_strdup(const struct m0_buf *buf)
static int sdev_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
M0_CONF__INVARIANT_DEFINE(sdev_invariant, m0_conf_sdev)
M0_CONF__BOB_DEFINE(m0_conf_sdev, M0_CONF_SDEV_MAGIC, sdev_check)
static struct m0_addb2_source * s
struct m0_pdclust_src_addr src
struct m0_buf xd_filename
#define offsetof(typ, memb)