Lines Matching refs:size
82 (*d)->size = offsetof(struct kdbus_item, vec) + sizeof(struct kdbus_vec);
85 (*d)->vec.size = sz;
87 *d = (struct kdbus_item *) ((uint8_t*) *d + (*d)->size);
96 (*d)->size = offsetof(struct kdbus_item, memfd) + sizeof(struct kdbus_memfd);
100 (*d)->memfd.size = sz;
102 *d = (struct kdbus_item *) ((uint8_t*) *d + (*d)->size);
111 (*d)->size = offsetof(struct kdbus_item, str) + length + 1;
115 *d = (struct kdbus_item *) ((uint8_t*) *d + (*d)->size);
125 i->size = offsetof(struct kdbus_item, bloom_filter) +
130 *d = (struct kdbus_item *) ((uint8_t*) i + i->size);
141 (*d)->size = offsetof(struct kdbus_item, fds) + sizeof(int) * n_fds;
145 *d = (struct kdbus_item *) ((uint8_t*) *d + (*d)->size);
148 static void add_bloom_arg(void *data, size_t size, unsigned n_hash, unsigned i, const char *t) {
153 assert(size > 0);
166 bloom_add_pair(data, size, n_hash, buf, t);
169 bloom_add_prefixes(data, size, n_hash, buf, t, '.');
171 bloom_add_prefixes(data, size, n_hash, buf, t, '/');
174 static void add_bloom_arg_has(void *data, size_t size, unsigned n_hash, unsigned i, const char *t) {
179 assert(size > 0);
192 bloom_add_pair(data, size, n_hash, buf, t);
370 append_payload_vec(&d, NULL, part->size);
378 append_payload_memfd(&d, part->memfd, part->memfd_offset, part->size);
388 append_payload_vec(&d, part->data, part->size);
403 m->kdbus->size = (uint8_t*) d - (uint8_t*) m->kdbus;
404 assert(m->kdbus->size <= sz);
460 l = d->size - offsetof(struct kdbus_item, data);
467 header_size = d->vec.size;
471 footer_size = d->vec.size;
473 n_bytes += d->vec.size;
481 n_bytes += d->memfd.size;
541 l = d->size - offsetof(struct kdbus_item, data);
550 if (idx + d->vec.size > begin_body) {
567 part->size = d->vec.size;
571 part->size = d->vec.size - (begin_body - idx);
577 idx += d->vec.size;
597 part->size = d->memfd.size;
600 idx += d->memfd.size;
726 d->size - offsetof(struct kdbus_item, caps.caps) < DIV_ROUND_UP(d->caps.last_cap, 32U) * 4 * 4) {
784 n = (d->size - offsetof(struct kdbus_item, data64)) / sizeof(uint64_t);
957 hello->size = sz;
965 item->size = offsetof(struct kdbus_item, str) + m + 1;
971 item->size = offsetof(struct kdbus_item, creds) + sizeof(struct kdbus_creds);
979 item->size = offsetof(struct kdbus_item, pids) + sizeof(struct kdbus_pids);
987 item->size = offsetof(struct kdbus_item, str) + l + 1;
1030 if (!bloom || !bloom_validate_parameters((size_t) bloom->size, (unsigned) bloom->n_hash)) {
1035 b->bloom_size = (size_t) bloom->size;
1083 .size = sizeof(cmd),
1106 close_many(d->fds, (d->size - offsetof(struct kdbus_item, fds)) / sizeof(int));
1131 cmd.size = sizeof(cmd);
1381 struct kdbus_cmd_recv recv = { .size = sizeof(recv) };
1473 static void close_and_munmap(int fd, void *address, size_t size) {
1474 if (size > 0)
1475 assert_se(munmap(address, PAGE_ALIGN(size)) >= 0);
1608 make->size = offsetof(struct kdbus_cmd, items);
1612 n->size = offsetof(struct kdbus_item, bloom_parameter) +
1615 n->bloom_parameter.size = DEFAULT_BLOOM_SIZE;
1621 make->size += ALIGN8(n->size);
1626 n->size = offsetof(struct kdbus_item, data64) + sizeof(uint64_t);
1628 make->size += ALIGN8(n->size);
1633 n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
1635 make->size += ALIGN8(n->size);
1710 make->size = ALIGN8(offsetof(struct kdbus_cmd, items));
1715 n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
1717 make->size += ALIGN8(n->size);
1741 struct kdbus_cmd byebye = { .size = sizeof(byebye) };
1754 .size = sizeof(recv),
1779 n->size = offsetof(struct kdbus_item, data64) + sizeof(uint64_t);
1782 update->size =
1784 ALIGN8(n->size);
1794 .size = sizeof(struct kdbus_cmd_info),