Searched defs:sz (Results 1 - 25 of 51) sorted by relevance

123

/systemd/src/libsystemd/sd-bus/
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 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 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-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 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 Dbus-socket.c67 static int append_iovec(sd_bus_message *m, const void *p, size_t sz) { argument
70 assert(sz > 0);
73 m->iovec[m->n_iovec].iov_len = sz;
/systemd/src/basic/
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 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 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 Dlocale-util.c82 size_t sz = 0; local
139 munmap((void*) p, 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/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...]
/systemd/src/coredump/
H A Dstacktrace.c134 size_t sz = 0; local
143 c.f = open_memstream(&buf, &sz);
/systemd/src/nspawn/
H A Dnspawn-setuid.c97 size_t sz = 0, l; local
236 if (!GREEDY_REALLOC(uids, sz, n_uids+1))
H A Dnspawn-network.c49 size_t l, sz; local
54 sz = sizeof(sd_id128_t) + l;
56 sz += sizeof(idx);
58 v = alloca(sz);
75 result = htole64(siphash24(v, sz, hash_key.bytes));
/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/import/
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 Dimport-raw.c322 static int raw_import_write(const void *p, size_t sz, void *userdata) { argument
331 n = sparse_write(i->output_fd, p, sz, 64);
334 if ((size_t) n < sz)
337 i->written_uncompressed += sz;
338 i->written_since_last_grow += sz;
H A Dimport-tar.c253 static int tar_import_write(const void *p, size_t sz, void *userdata) { argument
262 r = loop_write(i->tar_fd, p, sz, false);
266 i->written_uncompressed += sz;
267 i->written_since_last_grow += sz;
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 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...]
/systemd/src/network/
H A Dnetworkd-netdev.c413 size_t l, sz; local
425 sz = sizeof(sd_id128_t) + l;
426 v = alloca(sz);
439 result = siphash24(v, sz, HASH_KEY.bytes);
/systemd/src/nss-mymachines/
H A Dnss-mymachines.c168 size_t sz; local
174 r = sd_bus_message_read_array(reply, 'y', &a, &sz);
187 if (sz != FAMILY_ADDRESS_SIZE(family)) {
197 memcpy(r_tuple->addr, a, sz);
328 size_t sz; local
334 r = sd_bus_message_read_array(reply, 'y', &a, &sz);
345 if (sz != alen) {
/systemd/src/nss-resolve/
H A Dnss-resolve.c217 size_t sz; local
230 r = sd_bus_message_read_array(reply, 'y', &a, &sz);
241 if (sz != FAMILY_ADDRESS_SIZE(family)) {
251 memcpy(r_tuple->addr, a, sz);
417 size_t sz; local
428 r = sd_bus_message_read_array(reply, 'y', &a, &sz);
439 if (sz != alen) {
/systemd/src/resolve/
H A Dresolved-link-bus.c176 size_t sz; local
194 r = sd_bus_message_read_array(message, 'y', &d, &sz);
197 if (sz != FAMILY_ADDRESS_SIZE(family))
208 memcpy(&dns[n].address, d, sz);

Completed in 48 milliseconds

123