Motr  M0
pool_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from pool/pool.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "pool/pool.h"
8 #include "pool/pool_xc.h"
9 
10 #if !defined(__KERNEL__)
12 #endif
13 
14 #if !defined(__KERNEL__)
15 static struct _m0_pool_spare_usage_s {
19  ._type = {
21  .xct_name = "m0_pool_spare_usage",
22  .xct_sizeof = sizeof (struct m0_pool_spare_usage),
23  .xct_nr = 4,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_pool_spare_usage_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 #endif
32 
33 
34 #if !defined(__KERNEL__)
35 M0_BASSERT(sizeof(struct m0_pool_spare_usage) == 40U);
36 #endif
37 
38 #if !defined(__KERNEL__)
39 M0_BASSERT(sizeof ((struct m0_pool_spare_usage *)0)->psu_header == 16U);
41 #endif
42 #if !defined(__KERNEL__)
43 M0_BASSERT(sizeof ((struct m0_pool_spare_usage *)0)->psu_device_index == 4U);
45 #endif
46 #if !defined(__KERNEL__)
47 M0_BASSERT(sizeof ((struct m0_pool_spare_usage *)0)->psu_device_state == 4U);
48 M0_BASSERT(offsetof(struct m0_pool_spare_usage, psu_device_state) == 20U);
49 #endif
50 #if !defined(__KERNEL__)
51 M0_BASSERT(sizeof ((struct m0_pool_spare_usage *)0)->psu_footer == 16U);
53 #endif
54 
55 
56 
57 #if !defined(__KERNEL__)
59 {
61  .xf_name = "psu_header",
62 
63  .xf_type = m0_format_header_xc,
64 
65  .xf_tag = 0,
66  .xf_opaque = NULL,
67  .xf_offset = offsetof(struct m0_pool_spare_usage, psu_header),
68  .xf_read = NULL,
69  .xf_decor = {
71  }
72  };
74 
76  .xf_name = "psu_device_index",
77 
78  .xf_type = &M0_XT_U32,
79 
80  .xf_tag = 0,
81  .xf_opaque = NULL,
82  .xf_offset = offsetof(struct m0_pool_spare_usage, psu_device_index),
83  .xf_read = NULL,
84  .xf_decor = {
86  }
87  };
89 
91  .xf_name = "psu_device_state",
92 
93  .xf_type = &M0_XT_U32,
94 
95  .xf_tag = 0,
96  .xf_opaque = NULL,
97  .xf_offset = offsetof(struct m0_pool_spare_usage, psu_device_state),
98  .xf_read = &m0_xcode_enum_field_read,
99  .xf_decor = {
101  }
102  };
103  m0_xc_u32_init();
104 
106  .xf_name = "psu_footer",
107 
108  .xf_type = m0_format_footer_xc,
109 
110  .xf_tag = 0,
111  .xf_opaque = NULL,
112  .xf_offset = offsetof(struct m0_pool_spare_usage, psu_footer),
113  .xf_read = NULL,
114  .xf_decor = {
116  }
117  };
119 
121 }
122 #endif
123 
124 M0_INTERNAL void m0_xc_pool_pool_init(void)
125 {
126 #if !defined(__KERNEL__)
128 #endif
129 }
130 
131 M0_INTERNAL void m0_xc_pool_pool_fini(void)
132 {
133 }
M0_INTERNAL void m0_xc_pool_pool_init(void)
Definition: pool_xc.c:124
M0_BASSERT(offsetof(struct _m0_pool_spare_usage_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_pool_spare_usage_xc
Definition: pool_xc.c:11
struct m0_xcode_field _child[4]
Definition: pool_xc.c:17
struct m0_format_footer psu_footer
Definition: pool.h:417
M0_INTERNAL void m0_xc_pool_pool_fini(void)
Definition: pool_xc.c:131
struct m0_xcode_enum m0_xc_m0_pool_nd_state_enum
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_format_header_struct_init(void)
Definition: format_xc.c:191
struct m0_xcode_type _type
Definition: pool_xc.c:16
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
M0_INTERNAL void m0_xc_m0_pool_spare_usage_struct_init(void)
Definition: pool_xc.c:58
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_format_header_xc
Definition: format_xc.c:10
uint32_t psu_device_index
Definition: pool.h:413
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
struct m0_format_header psu_header
Definition: pool.h:408
#define offsetof(typ, memb)
Definition: misc.h:29
static struct _m0_pool_spare_usage_s _m0_pool_spare_usage
M0_INTERNAL int m0_xcode_enum_field_read(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
Definition: enum.c:142
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11