Searched refs:sz (Results 1 - 25 of 62) sorted by relevance

123

/systemd/src/libsystemd/sd-bus/
H A Dbus-gvariant.h28 size_t bus_gvariant_determine_word_size(size_t sz, size_t extra);
29 void bus_gvariant_write_word_le(void *p, size_t sz, size_t value);
30 size_t bus_gvariant_read_word_le(void *p, size_t sz);
H A Dbus-gvariant.c253 size_t bus_gvariant_determine_word_size(size_t sz, size_t extra) { argument
254 if (sz + extra <= 0xFF)
256 else if (sz + extra*2 <= 0xFFFF)
258 else if (sz + extra*4 <= 0xFFFFFFFF)
264 size_t bus_gvariant_read_word_le(void *p, size_t sz) { argument
273 if (sz == 1)
276 memcpy(&x, p, sz);
278 if (sz == 2)
280 else if (sz == 4)
282 else if (sz
288 bus_gvariant_write_word_le(void *p, size_t sz, size_t value) argument
[all...]
H A Dbus-message.c44 static void *adjust_pointer(const void *p, void *old_base, size_t sz, void *new_base) { argument
55 if ((uint8_t*) p >= (uint8_t*) old_base + sz)
159 static void *message_extend_fields(sd_bus_message *m, size_t align, size_t sz, bool add_offset) { argument
170 new_size = start + sz;
551 size_t sz; local
565 sz = length - sizeof(struct bus_header) - ALIGN8(m->fields_size);
566 if (sz > 0) {
569 m->body.size = sz;
1206 static void part_zero(struct bus_body_part *part, size_t sz) { argument
1208 assert(sz >
1220 part_make_space( struct sd_bus_message *m, struct bus_body_part *part, size_t sz, void **q) argument
1337 message_extend_body( sd_bus_message *m, size_t align, size_t sz, bool add_offset, bool force_inline) argument
1471 ssize_t align, sz; local
2114 size_t payload, sz, i; local
2237 size_t sz; local
2579 ssize_t align, sz; local
2685 ssize_t align, sz; local
2884 size_t sz, l; local
3007 uint64_t sz; local
3099 buffer_peek(const void *p, uint32_t sz, size_t *rindex, size_t align, size_t nbytes, void **r) argument
3166 find_part(sd_bus_message *m, size_t index, size_t sz, void **p) argument
3218 int sz; local
3430 int sz, align; local
3540 ssize_t sz, align; local
3679 size_t where, p = 0, framing, sz; local
3817 size_t sz; local
4804 size_t sz; local
5166 size_t sz = 0; local
5548 bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz) argument
[all...]
H A Dtest-bus-zero-copy.c47 uint64_t sz; local
110 r = memfd_get_size(f, &sz);
112 assert_se(sz == STRING_SIZE);
127 r = memfd_get_size(f, &sz);
129 assert_se(sz == SECOND_ARRAY);
H A Dtest-bus-marshal.c129 size_t sz; local
209 r = bus_message_get_blob(m, &buffer, &sz);
212 h = hexmem(buffer, sz);
215 log_info("message size = %zu, contents =\n%s", sz, h);
227 g = g_dbus_message_new_from_blob(buffer, sz, 0, NULL);
242 w = dbus_message_demarshal(buffer, sz, &error);
254 r = bus_message_from_malloc(bus, buffer, sz, NULL, 0, NULL, &m);
334 r = sd_bus_message_read_array(m, 'i', (const void**) &return_array, &sz);
336 assert_se(sz == sizeof(integer_array));
337 assert_se(memcmp(integer_array, return_array, sz)
[all...]
H A Dtest-bus-gvariant.c137 size_t sz; local
185 assert_se(bus_message_get_blob(m, &blob, &sz) >= 0);
192 v = g_variant_new_from_data(G_VARIANT_TYPE("(yyyyuta{tv}v)"), blob, sz, false, NULL, NULL);
201 assert_se(bus_message_from_malloc(bus, blob, sz, NULL, 0, NULL, &n) >= 0);
H A Dtest-bus-benchmark.c61 size_t sz; local
64 assert_se(sd_bus_message_read_array(m, 'y', &p, &sz) > 0);
80 static void transaction(sd_bus *b, size_t sz, const char *server_name) { argument
85 assert_se(sd_bus_message_append_array_space(m, 'y', sz, (void**) &p) >= 0);
87 memset(p, 0x80, sz);
H A Dbus-control.c861 size_t sz = 0; local
877 r = sd_bus_message_read_array(reply, 'y', &p, &sz);
881 c->label = strndup(p, sz);
1108 size_t sz, l; local
1116 sz = ALIGN8(offsetof(struct kdbus_cmd_match, items) +
1121 m = alloca0_align(sz, 8);
1122 m->size = sz;
1171 uint64_t sz; local
1177 sz = ALIGN8(offsetof(struct kdbus_cmd_match, items) +
1181 m = alloca0_align(sz,
1228 size_t sz; local
[all...]
H A Dbus-kernel.c72 static void append_payload_vec(struct kdbus_item **d, const void *p, size_t sz) { argument
74 assert(sz > 0);
85 (*d)->vec.size = sz;
90 static void append_payload_memfd(struct kdbus_item **d, int memfd, size_t start, size_t sz) { argument
93 assert(sz > 0);
100 (*d)->memfd.size = sz;
273 size_t sz, dl; local
305 sz = offsetof(struct kdbus_msg, items);
308 sz += (1 + m->n_body_parts) * ALIGN8(offsetof(struct kdbus_item, vec) +
313 sz
891 size_t l = 0, m = 0, sz; local
[all...]
/systemd/src/basic/
H A Dmemfd-util.h28 int memfd_new_and_map(const char *name, size_t sz, void **p);
35 int memfd_get_size(int fd, uint64_t *sz);
36 int memfd_set_size(int fd, uint64_t sz);
H A Dextract-word.c39 size_t allocated = 0, sz = 0; local
63 if (!GREEDY_REALLOC(s, allocated, sz+1))
78 if (!GREEDY_REALLOC(s, allocated, sz+1))
86 if (!GREEDY_REALLOC(s, allocated, sz+7))
99 s[sz++] = '\\';
114 s[sz++] = '\\';
115 s[sz++] = c;
122 s[sz++] = u;
124 sz += utf8_encode_unichar(s + sz,
[all...]
H A Dmemfd-util.c124 int memfd_get_size(int fd, uint64_t *sz) { argument
129 assert(sz);
135 *sz = stat.st_size;
139 int memfd_set_size(int fd, uint64_t sz) { argument
144 r = ftruncate(fd, sz);
151 int memfd_new_and_map(const char *name, size_t sz, void **p) { argument
155 assert(sz > 0);
162 r = memfd_set_size(fd, sz);
166 r = memfd_map(fd, 0, sz, p);
H A Dio-util.c204 static size_t nul_length(const uint8_t *p, size_t sz) { argument
207 while (sz > 0) {
213 sz--;
219 ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length) { argument
224 e = q + sz;
H A Dfs-util.h67 #define FOREACH_INOTIFY_EVENT(e, buffer, sz) \
69 (uint8_t*) (e) < (uint8_t*) (buffer.raw) + (sz); \
H A Dprocess-util.c381 size_t allocated = 0, sz = 0; local
396 if (!GREEDY_REALLOC(outcome, allocated, sz + 5))
400 outcome[sz++] = '\n';
402 sz += cescape_char(c, outcome + sz);
410 outcome[sz] = '\0';
/systemd/src/import/
H A Dpull-job.c179 static int pull_job_write_uncompressed(const void *p, size_t sz, void *userdata) { argument
186 if (sz <= 0)
189 if (j->written_uncompressed + sz < j->written_uncompressed) {
194 if (j->written_uncompressed + sz > j->uncompressed_max) {
207 n = sparse_write(j->disk_fd, p, sz, 64);
209 n = write(j->disk_fd, p, sz);
212 if ((size_t) n < sz) {
218 if (!GREEDY_REALLOC(j->payload, j->payload_allocated, j->payload_size + sz))
221 memcpy(j->payload + j->payload_size, p, sz);
222 j->payload_size += sz;
231 pull_job_write_compressed(PullJob *j, void *p, size_t sz) argument
341 size_t sz = size * nmemb; local
392 size_t sz = size * nmemb; local
[all...]
H A Dcurl-util.c381 int curl_header_strdup(const void *contents, size_t sz, const char *field, char **value) { argument
387 if (sz < l)
394 sz -= l;
396 if (memchr(p, 0, sz))
400 while (sz > 0 && strchr(WHITESPACE, p[0])) {
402 sz--;
406 while (sz > 0 && strchr(WHITESPACE, p[sz-1]))
407 sz--;
409 s = strndup(p, sz);
[all...]
H A Dqcow2-util.c119 uint64_t sz; local
150 sz = (uint8_t*) s.next_out - (uint8_t*) buffer2;
152 if (r != Z_STREAM_END || sz != cluster_size)
176 uint64_t sz, csize_shift, csize_mask; local
183 sz = (((q >> csize_shift) & csize_mask) + 1) * 512 - (q & 511);
187 *compressed_size = sz;
250 uint64_t sz, i; local
288 sz = sizeof(uint64_t) * HEADER_L1_SIZE(&header);
289 l = pread(qcow2_fd, l1_table, sz, HEADER_L1_TABLE_OFFSET(&header));
292 if ((uint64_t) l != sz)
[all...]
H A Dcurl-util.h52 int curl_header_strdup(const void *contents, size_t sz, const char *field, char **value);
H A Dpull-job.h32 typedef int (*PullJobHeader)(PullJob *job, const char *header, size_t sz);
/systemd/src/shared/
H A Dfirewall-util.c94 size_t sz; local
108 sz = XT_ALIGN(sizeof(struct ipt_entry)) +
113 entry = alloca0(sz);
114 entry->next_offset = sz;
130 mask = alloca(sz);
131 memset(mask, 0xFF, sz);
177 size_t sz, msz; local
198 sz = XT_ALIGN(sizeof(struct ipt_entry)) +
211 sz += msz;
214 entry = alloca0(sz);
[all...]
H A Ddns-domain.h46 int dns_label_unescape(const char **name, char *dest, size_t sz);
47 int dns_label_unescape_suffix(const char *name, const char **label_end, char *dest, size_t sz);
48 int dns_label_escape(const char *p, size_t l, char *dest, size_t sz);
H A Ddns-domain.c42 int dns_label_unescape(const char **name, char *dest, size_t sz) { argument
65 if (sz <= 0)
82 sz--;
110 sz--;
123 sz--;
134 if (sz >= 1 && d)
144 int dns_label_unescape_suffix(const char *name, const char **label_terminal, char *dest, size_t sz) { argument
154 if (sz >= 1)
198 r = dns_label_unescape(&name, dest, sz);
207 int dns_label_escape(const char *p, size_t l, char *dest, size_t sz) { argument
[all...]
/systemd/src/test/
H A Dtest-copy.c39 size_t sz = 0; local
54 assert_se(read_full_file(fn_copy, &buf, &sz) == 0);
56 assert_se(sz == 20);
116 size_t sz = 0; local
120 assert_se(read_full_file(f, &buf, &sz) == 0);
/systemd/src/coredump/
H A Dstacktrace.c134 size_t sz = 0; local
143 c.f = open_memstream(&buf, &sz);

Completed in 74 milliseconds

123