29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB 62 const void *
data, uint32_t nob,
92 return x->b_nob == y->
b_nob &&
93 memcmp(
x->b_addr, y->
b_addr,
x->b_nob) == 0;
101 memcpy(
dst->b_addr,
src->b_addr,
src->b_nob);
108 if (
src->b_nob != 0) {
113 memcpy(
dest->b_addr,
src->b_addr,
src->b_nob);
136 return strlen(str) ==
buf->b_nob &&
137 memcmp(str,
buf->b_addr,
buf->b_nob) == 0;
146 s = memchr(
buf->b_addr, 0,
buf->b_nob);
151 memcpy(
s,
buf->b_addr, len);
169 if (
dest->ab_count == 0)
176 for (
i = 0;
i <
dest->ab_count; ++
i) {
195 if (
src->ab_count == 0)
202 for (
i = 0;
i <
src->ab_count; ++
i) {
221 for (
i = 0; strs[
i] !=
NULL; ++
i) {
237 #undef M0_TRACE_SUBSYSTEM M0_INTERNAL int m0_buf_copy_aligned(struct m0_buf *dst, const struct m0_buf *src, unsigned shift)
M0_INTERNAL int m0_buf_new_aligned(struct m0_buf *buf, const void *data, uint32_t nob, unsigned shift)
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL bool m0_buf_is_set(const struct m0_buf *buf)
M0_INTERNAL bool m0_buf_eq(const struct m0_buf *x, const struct m0_buf *y)
M0_INTERNAL bool m0_buf_streq(const struct m0_buf *buf, const char *str)
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
#define min_type(t, a, b)
M0_INTERNAL int m0_buf_cmp(const struct m0_buf *x, const struct m0_buf *y)
M0_INTERNAL void m0_buf_memcpy(struct m0_buf *dst, const struct m0_buf *src)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL bool m0_bufs_streq(const struct m0_bufs *bufs, const char **strs)
M0_INTERNAL void m0_bufs_free(struct m0_bufs *bufs)
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
void * m0_alloc(size_t size)
#define M0_BUF_INITS(str)
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
M0_INTERNAL int m0_buf_copy(struct m0_buf *dest, const struct m0_buf *src)
static uint8_t fail[DATA_UNIT_COUNT_MAX+PARITY_UNIT_COUNT_MAX]
M0_INTERNAL char * m0_buf_strdup(const struct m0_buf *buf)
M0_INTERNAL int m0_bufs_to_strings(const char ***dest, const struct m0_bufs *src)
#define M0_ALLOC_ARR_ALIGNED(arr, nr, shift)
static struct m0_addb2_source * s
struct m0_pdclust_src_addr src
M0_INTERNAL int m0_bufs_from_strings(struct m0_bufs *dest, const char **src)