Searched defs:size (Results 1 - 25 of 104) sorted by relevance

12345

/systemd/src/libsystemd/sd-bus/
H A Dbus-introspect.h31 size_t size; member in struct:introspect
H A Dbus-bloom.c41 size_t size, /* Size of the filter in bytes */
51 assert(size > 0);
55 m = size * 8;
88 void bloom_add_pair(uint64_t filter[], size_t size, unsigned k, const char *a, const char *b) { argument
100 bloom_add_data(filter, size, k, c, n);
103 void bloom_add_prefixes(uint64_t filter[], size_t size, unsigned k, const char *a, const char *b, char sep) { argument
117 bloom_add_data(filter, size, k, c, n);
127 bloom_add_data(filter, size, k, c, e - c + 1);
133 bloom_add_data(filter, size, k, c, e - c);
137 bool bloom_validate_parameters(size_t size, unsigne argument
39 bloom_add_data( uint64_t filter[], size_t size, unsigned k, const void *data, size_t n) argument
[all...]
/systemd/src/basic/
H A Dstrxcpyx.c23 * Returns the * remaining size, and 0 if the string was truncated.
32 size_t strpcpy(char **dest, size_t size, const char *src) { argument
36 if (len >= size) {
37 if (size > 1)
38 *dest = mempcpy(*dest, src, size-1);
39 size = 0;
43 size -= len;
47 return size;
50 size_t strpcpyf(char **dest, size_t size, const char *src, ...) { argument
55 i = vsnprintf(*dest, size, sr
68 strpcpyl(char **dest, size_t size, const char *src, ...) argument
80 strscpy(char *dest, size_t size, const char *src) argument
87 strscpyl(char *dest, size_t size, const char *src, ...) argument
[all...]
H A Dalloc-util.c40 void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) { argument
50 newalloc = MAX(need * 2, 64u / size);
51 a = newalloc * size;
54 if (a < size * need)
66 void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size) { argument
75 q = greedy_realloc(p, allocated, need, size);
80 memzero(q + prev * size, (*allocated - prev) * size);
H A Dmempool.c54 size_t size; local
59 size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*mp->tile_size);
60 n = (size - ALIGN(sizeof(struct pool))) / mp->tile_size;
62 p = malloc(size);
H A Dmemfd-util.c76 int memfd_map(int fd, uint64_t offset, size_t size, void **p) { argument
81 assert(size > 0);
89 q = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, offset);
91 q = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset);
H A Dsocket-util.h48 /* We store the size here explicitly due to the weird
50 socklen_t size; member in struct:SocketAddress
H A Dutil.h89 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
97 static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) { argument
102 qsort(base, nmemb, size, compar);
H A Dxattr-util.c106 ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags) { argument
119 l = getxattr(fn, attribute, value, size);
/systemd/src/reply-password/
H A Dreply-password.c32 static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) { argument
46 if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0)
/systemd/src/shared/
H A Dtest-tables.h29 int size,
33 for (i = -1; i < size + 1; i++) {
45 if (boring < 1 || i == size)
50 assert_se(!(i >= 0 && i < size ?
26 _test_table(const char *name, lookup_t lookup, reverse_t reverse, int size, bool sparse) argument
/systemd/src/core/
H A Dbus-endpoint.c34 size_t size; local
37 size = ALIGN8(offsetof(struct kdbus_cmd, items));
40 size += ALIGN8(offsetof(struct kdbus_item, str) + strlen(po->name) + 1);
41 size += ALIGN8(offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access));
44 update = alloca0_align(size, 8);
45 update->size = size;
51 n->size = offsetof(struct kdbus_item, str) + strlen(po->name) + 1;
56 n->size = offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access);
H A Dbus-policy.c101 struct kdbus_cmd_free cmd_free = { .size = sizeof(cmd_free) };
106 size_t size; local
118 size = offsetof(struct kdbus_cmd_hello, items) +
122 hello = alloca0_align(size, 8);
126 n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
132 n->size = offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access);
143 n->size = offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access);
148 hello->size = size;
H A Ddbus-service.c242 size_t size = 0; local
247 f = open_memstream(&buf, &size);
H A Ddbus-cgroup.c399 size_t size = 0; local
409 f = open_memstream(&buf, &size);
484 size_t size = 0; local
493 f = open_memstream(&buf, &size);
631 size_t size = 0; local
640 f = open_memstream(&buf, &size);
/systemd/src/boot/efi/
H A Dstub.c34 UINTN size; local
70 if (efivar_get_raw(&global_guid, L"SecureBoot", &b, &size) == EFI_SUCCESS) {
/systemd/src/import/
H A Dimport-compress.c44 int import_uncompress_detect(ImportCompress *c, const void *data, size_t size) { argument
62 if (size < MAX3(sizeof(xz_signature),
99 int import_uncompress(ImportCompress *c, const void *data, size_t size, ImportCompressCallback callback, void *userdata) { argument
105 r = import_uncompress_detect(c, data, size);
112 if (size <= 0)
120 r = callback(data, size, userdata);
128 c->xz.avail_in = size;
150 c->gzip.avail_in = size;
171 c->bzip2.avail_in = size;
261 int import_compress(ImportCompress *c, const void *data, size_t size, voi argument
[all...]
/systemd/src/journal-remote/
H A Djournal-remote-parse.h40 size_t size; /* total size of the buffer */ member in struct:RemoteSource
46 size_t data_size; /* and the size of the binary data chunk being processed */
68 int push_data(RemoteSource *source, const char *data, size_t size);
H A Djournal-remote-parse.c76 static char* realloc_buffer(RemoteSource *source, size_t size) { argument
79 b = GREEDY_REALLOC(source->buf, source->size, size);
88 static int get_line(RemoteSource *source, char **line, size_t *size) { argument
95 assert(source->filled <= source->size);
96 assert(source->buf == NULL || source->size > 0);
120 we reallocate it, we'll increase the size at least a bit. */
122 if (source->size - source->filled < LINE_CHUNK &&
127 assert(source->size - source->filled >= LINE_CHUNK ||
128 source->size
152 push_data(RemoteSource *source, const char *data, size_t size) argument
169 fill_fixed_size(RemoteSource *source, void **data, size_t size) argument
[all...]
H A Djournal-upload-journal.c30 * Write up to size bytes to buf. Return negative on error, and number of
33 static ssize_t write_entry(char *buf, size_t size, Uploader *u) { argument
37 assert(size <= SSIZE_MAX);
49 r = snprintf(buf + pos, size - pos,
51 if (pos + r > size)
57 if (pos + r == size) {
59 buf[size - 1] = '\n';
60 return size;
73 r = snprintf(buf + pos, size - pos,
75 if (r + pos > size)
245 journal_input_callback(void *buf, size_t size, size_t nmemb, void *userp) argument
[all...]
/systemd/src/libsystemd-network/
H A Ddhcp-option.c30 static int option_append(uint8_t options[], size_t size, size_t *offset, argument
37 size --;
43 if (size < *offset + 1)
51 if (size < *offset + optlen + 2)
71 int dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset, argument
84 if (*offset < size) {
86 r = option_append(message->options, size, offset, code, optlen, optval);
92 r = option_append(message->options, size, offset, SD_DHCP_OPTION_END, 0, NULL);
96 *offset = size;
102 file_offset = *offset - size;
[all...]
H A Dtest-dhcp-server.c28 static void test_pool(struct in_addr *address, unsigned size, int ret) { argument
33 assert_se(sd_dhcp_server_configure_pool(server, address, 8, 0, size) == ret);
/systemd/src/network/
H A Dtest-network.c30 int size; local
43 assert_se((size = deserialize_in_addrs(&addresses, addresses_string)) >= 0);
44 assert_se(size == 3);
49 assert_se((size = deserialize_in6_addrs(&addresses6, addresses_string)) >= 0);
50 assert_se(size == 3);
57 size_t size, allocated; local
61 assert_se(deserialize_dhcp_routes(&routes, &size, &allocated, "") >= 0);
62 assert_se(size == 0);
70 assert_se(deserialize_dhcp_routes(&routes, &size, &allocated, routes_string) >= 0);
72 assert_se(size
[all...]
/systemd/src/journal/
H A Dtest-catalog.c47 static Hashmap * test_import(const char* contents, ssize_t size, int code) { argument
53 if (size < 0)
54 size = strlen(contents);
60 assert_se(write(fd, contents, size) == size);
H A Dtest-compress-benchmark.c104 size_t j = 0, k = 0, size; local
107 size = permute(i);
109 log_debug("%s %zu %zu", type, i, size);
111 memzero(buf, MIN(size + 1000, MAX_SIZE));
113 r = compress(text, size, buf, size, &j);
115 assert_se(r == 0 || (size < 2048 && r == -ENOBUFS) || streq(type, "random"));
118 assert_se(buf[size] == 0);
120 skipped += size;
125 if (j >= size)
[all...]

Completed in 49 milliseconds

12345