Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 25 of 108) sorted by relevance

12345

/systemd-251/src/libsystemd/sd-bus/
Dbus-gvariant.c241 size_t bus_gvariant_determine_word_size(size_t sz, size_t extra) { in bus_gvariant_determine_word_size() argument
242 if (sz + extra <= 0xFF) in bus_gvariant_determine_word_size()
244 else if (sz + extra*2 <= 0xFFFF) in bus_gvariant_determine_word_size()
246 else if (sz + extra*4 <= 0xFFFFFFFF) in bus_gvariant_determine_word_size()
252 size_t bus_gvariant_read_word_le(void *p, size_t sz) { in bus_gvariant_read_word_le() argument
261 if (sz == 1) in bus_gvariant_read_word_le()
264 memcpy(&x, p, sz); in bus_gvariant_read_word_le()
266 if (sz == 2) in bus_gvariant_read_word_le()
268 else if (sz == 4) in bus_gvariant_read_word_le()
270 else if (sz == 8) in bus_gvariant_read_word_le()
[all …]
Dbus-message.c26 static void *adjust_pointer(const void *p, void *old_base, size_t sz, void *new_base) { in adjust_pointer() argument
37 if ((uint8_t*) p >= (uint8_t*) old_base + sz) in adjust_pointer()
150 static void *message_extend_fields(sd_bus_message *m, size_t align, size_t sz, bool add_offset) { in message_extend_fields() argument
161 new_size = start + sz; in message_extend_fields()
541 size_t sz; in bus_message_from_malloc() local
555 sz = length - sizeof(struct bus_header) - ALIGN8(m->fields_size); in bus_message_from_malloc()
556 if (sz > 0) { in bus_message_from_malloc()
559 m->body.size = sz; in bus_message_from_malloc()
1226 static void part_zero(struct bus_body_part *part, size_t sz) { in part_zero() argument
1228 assert(sz > 0); in part_zero()
[all …]
Dtest-bus-marshal.c116 size_t sz; in main() local
200 r = bus_message_get_blob(m, &buffer, &sz); in main()
203 h = cescape_length(buffer, sz); in main()
205 log_info("message size = %zu, contents =\n%s", sz, h); in main()
218 g = g_dbus_message_new_from_blob(buffer, sz, 0, NULL); in main()
234 w = dbus_message_demarshal(buffer, sz, &error); in main()
246 r = bus_message_from_malloc(bus, buffer, sz, NULL, 0, NULL, &m); in main()
326 r = sd_bus_message_read_array(m, 'i', (const void**) &return_array, &sz); in main()
328 assert_se(sz == sizeof(integer_array)); in main()
329 assert_se(memcmp(integer_array, return_array, sz) == 0); in main()
[all …]
Dbus-gvariant.h10 size_t bus_gvariant_determine_word_size(size_t sz, size_t extra);
11 void bus_gvariant_write_word_le(void *p, size_t sz, size_t value);
12 size_t bus_gvariant_read_word_le(void *p, size_t sz);
/systemd-251/src/basic/
Dextract-word.c22 size_t sz = 0; in extract_first_word() local
46 if (!GREEDY_REALLOC(s, sz+1)) in extract_first_word()
62 if (!GREEDY_REALLOC(s, sz+1)) in extract_first_word()
70 if (!GREEDY_REALLOC(s, sz+7)) in extract_first_word()
83 s[sz++] = '\\'; in extract_first_word()
103 s[sz++] = u; in extract_first_word()
105 sz += utf8_encode_unichar(s + sz, u); in extract_first_word()
109 s[sz++] = c; in extract_first_word()
111 s[sz++] = '\\'; in extract_first_word()
112 s[sz++] = c; in extract_first_word()
[all …]
Dmemfd-util.c96 int memfd_get_size(int fd, uint64_t *sz) { in memfd_get_size() argument
100 assert(sz); in memfd_get_size()
105 *sz = stat.st_size; in memfd_get_size()
109 int memfd_set_size(int fd, uint64_t sz) { in memfd_set_size() argument
112 return RET_NERRNO(ftruncate(fd, sz)); in memfd_set_size()
115 int memfd_new_and_map(const char *name, size_t sz, void **p) { in memfd_new_and_map() argument
119 assert(sz > 0); in memfd_new_and_map()
126 r = memfd_set_size(fd, sz); in memfd_new_and_map()
130 r = memfd_map(fd, 0, sz, p); in memfd_new_and_map()
Dinotify-util.h13 #define _FOREACH_INOTIFY_EVENT(e, buffer, sz, log_level, start, end) \ argument
16 *end = (struct inotify_event*) ((uint8_t*) start + (sz)), \
23 #define _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, log_level) \ argument
24 _FOREACH_INOTIFY_EVENT(e, buffer, sz, log_level, UNIQ_T(start, UNIQ), UNIQ_T(end, UNIQ))
26 #define FOREACH_INOTIFY_EVENT(e, buffer, sz) \ argument
27 _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, LOG_DEBUG)
29 #define FOREACH_INOTIFY_EVENT_WARN(e, buffer, sz) \ argument
30 _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, LOG_WARNING)
Ddirent-util.h50 #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz) \ argument
51 for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \
55 #define DEFINE_DIRENT_BUFFER(name, sz) \ argument
58 uint8_t data[(sz) * DIRENT_SIZE_MAX]; \
Dmemfd-util.h10 int memfd_new_and_map(const char *name, size_t sz, void **p);
17 int memfd_get_size(int fd, uint64_t *sz);
18 int memfd_set_size(int fd, uint64_t sz);
/systemd-251/src/import/
Dpull-job.c305 static int pull_job_write_uncompressed(const void *p, size_t sz, void *userdata) { in pull_job_write_uncompressed() argument
312 assert(sz > 0); in pull_job_write_uncompressed()
314 if (j->written_uncompressed > UINT64_MAX - sz) in pull_job_write_uncompressed()
322 if (j->written_uncompressed + sz > j->uncompressed_max) { in pull_job_write_uncompressed()
324sz = j->uncompressed_max - j->written_uncompressed; /* since we have the data in memory in pull_job_write_uncompressed()
334 n = sparse_write(j->disk_fd, p, sz, 64); in pull_job_write_uncompressed()
337 if ((size_t) n < sz) in pull_job_write_uncompressed()
340 r = loop_write(j->disk_fd, p, sz, false); in pull_job_write_uncompressed()
347 if (!GREEDY_REALLOC(j->payload, j->payload_size + sz)) in pull_job_write_uncompressed()
350 memcpy(j->payload + j->payload_size, p, sz); in pull_job_write_uncompressed()
[all …]
Dqcow2-util.c102 uint64_t sz; in decompress_cluster() local
133 sz = (uint8_t*) s.next_out - (uint8_t*) buffer2; in decompress_cluster()
135 if (r != Z_STREAM_END || sz != cluster_size) in decompress_cluster()
159 uint64_t sz, csize_shift, csize_mask; in normalize_offset() local
166 sz = (((q >> csize_shift) & csize_mask) + 1) * 512 - (q & 511); in normalize_offset()
170 *compressed_size = sz; in normalize_offset()
232 uint64_t sz, i; in qcow2_convert() local
270 sz = sizeof(uint64_t) * HEADER_L1_SIZE(&header); in qcow2_convert()
271 l = pread(qcow2_fd, l1_table, sz, HEADER_L1_TABLE_OFFSET(&header)); in qcow2_convert()
274 if ((uint64_t) l != sz) in qcow2_convert()
Dcurl-util.c323 int curl_header_strdup(const void *contents, size_t sz, const char *field, char **value) { in curl_header_strdup() argument
327 p = memory_startswith_no_case(contents, sz, field); in curl_header_strdup()
331 sz -= p - (const char*) contents; in curl_header_strdup()
333 if (memchr(p, 0, sz)) in curl_header_strdup()
337 while (sz > 0 && strchr(WHITESPACE, p[0])) { in curl_header_strdup()
339 sz--; in curl_header_strdup()
343 while (sz > 0 && strchr(WHITESPACE, p[sz-1])) in curl_header_strdup()
344 sz--; in curl_header_strdup()
346 s = strndup(p, sz); in curl_header_strdup()
Dimport-raw.c347 static int raw_import_write(const void *p, size_t sz, void *userdata) { in raw_import_write() argument
354 assert(sz > 0); in raw_import_write()
356 if (i->written_uncompressed >= UINT64_MAX - sz) in raw_import_write()
365 if (i->written_uncompressed + sz > i->size_max) { in raw_import_write()
367sz = i->size_max - i->written_uncompressed; /* since we have the data in memory in raw_import_write()
377 n = sparse_write(i->output_fd, p, sz, 64); in raw_import_write()
380 if ((size_t) n < sz) in raw_import_write()
383 r = loop_write(i->output_fd, p, sz, false); in raw_import_write()
388 i->written_uncompressed += sz; in raw_import_write()
/systemd-251/src/shared/
Dresize-fs.c16 int resize_fs(int fd, uint64_t sz, uint64_t *ret_size) { in resize_fs() argument
23 if (sz <= 0 || sz == UINT64_MAX) in resize_fs()
32 if (sz < EXT4_MINIMAL_SIZE) in resize_fs()
35 u = sz / sfs.f_bsize; in resize_fs()
51 if (sz < BTRFS_MINIMAL_SIZE) in resize_fs()
54 sz -= sz % sfs.f_bsize; in resize_fs()
56 xsprintf(args.name, "%" PRIu64, sz); in resize_fs()
62 *ret_size = sz; in resize_fs()
68 if (sz < XFS_MINIMAL_SIZE) in resize_fs()
76 .newblocks = sz / geo.blocksize, in resize_fs()
Dfirewall-util-iptables.c92 size_t sz; in fw_iptables_add_masquerade() local
109 sz = XT_ALIGN(sizeof(struct ipt_entry)) + in fw_iptables_add_masquerade()
114 entry = alloca0(sz); in fw_iptables_add_masquerade()
115 entry->next_offset = sz; in fw_iptables_add_masquerade()
131 mask = alloca_safe(sz); in fw_iptables_add_masquerade()
132 memset(mask, 0xFF, sz); in fw_iptables_add_masquerade()
173 size_t sz, msz; in fw_iptables_add_local_dnat() local
199 sz = XT_ALIGN(sizeof(struct ipt_entry)) + in fw_iptables_add_local_dnat()
212 sz += msz; in fw_iptables_add_local_dnat()
215 entry = alloca0(sz); in fw_iptables_add_local_dnat()
[all …]
Ddns-domain.c21 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { in dns_label_unescape() argument
47 if (sz <= 0) in dns_label_unescape()
70 sz--; in dns_label_unescape()
103 sz--; in dns_label_unescape()
125 sz--; in dns_label_unescape()
140 if (sz >= 1 && d) in dns_label_unescape()
150 int dns_label_unescape_suffix(const char *name, const char **label_terminal, char *dest, size_t sz)… in dns_label_unescape_suffix() argument
160 if (sz >= 1) in dns_label_unescape_suffix()
198 r = dns_label_unescape(&name, dest, sz, 0); in dns_label_unescape_suffix()
207 int dns_label_escape(const char *p, size_t l, char *dest, size_t sz) { in dns_label_escape() argument
[all …]
/systemd-251/po/
Dhu.po30 "Hitelesítés szükséges a bevitt jelmondat visszaküldéséhez a rendszernek."
39 "Hitelesítés szükséges a rendszerszolgáltatások vagy más egységek kezeléséhez."
48 "Hitelesítés szükséges a rendszerszolgáltatás- vagy egységfájlok kezeléséhez."
61 "Hitelesítés szükséges a rendszer- és szolgáltatáskezelő környezeti "
70 msgstr "Hitelesítés szükséges a systemd állapotának újratöltéséhez."
80 msgstr "Hitelesítés szükséges a systemd állapotának újratöltéséhez."
90 msgstr "Hitelesítés szükséges a systemd állapotának újratöltéséhez."
103 "Hitelesítés szükséges az aktív munkamenetek, felhasználók és munkaállomások "
115 "Hitelesítés szükséges eszköz csatolásának engedélyezéséhez egy "
126 msgstr "Hitelesítés szükséges a falüzenet beállításához"
[all …]
/systemd-251/src/boot/efi/
Dutil.c534 UINTN sz; in readdir_harder() local
549 sz = sizeof(EFI_FILE_INFO) + 256 * sizeof(CHAR16); in readdir_harder()
550 *buffer = xallocate_pool(sz); in readdir_harder()
551 *buffer_size = sz; in readdir_harder()
553 sz = *buffer_size; in readdir_harder()
555 err = handle->Read(handle, &sz, *buffer); in readdir_harder()
558 *buffer = xallocate_pool(sz); in readdir_harder()
559 *buffer_size = sz; in readdir_harder()
560 err = handle->Read(handle, &sz, *buffer); in readdir_harder()
565 if (sz == 0) { in readdir_harder()
[all …]
/systemd-251/src/network/tc/
Dtc-util.c90 uint32_t sz; in tc_fill_ratespec_and_table() local
92 sz = (i + 1) << cell_log; in tc_fill_ratespec_and_table()
93 if (sz < rate->mpu) in tc_fill_ratespec_and_table()
94 sz = rate->mpu; in tc_fill_ratespec_and_table()
95 r = tc_transmit_time(rate->rate, sz, &rtab[i]); in tc_fill_ratespec_and_table()
Dfq.c185 uint64_t sz; in config_parse_fair_queueing_size() local
219 r = parse_size(rvalue, 1024, &sz); in config_parse_fair_queueing_size()
226 if (sz > UINT32_MAX) { in config_parse_fair_queueing_size()
233 *p = sz; in config_parse_fair_queueing_size()
369 uint64_t sz; in config_parse_fair_queueing_max_rate() local
395 r = parse_size(rvalue, 1000, &sz); in config_parse_fair_queueing_max_rate()
402 if (sz / 8 > UINT32_MAX) { in config_parse_fair_queueing_max_rate()
409 fq->max_rate = sz / 8; in config_parse_fair_queueing_max_rate()
/systemd-251/src/nss-mymachines/
Dnss-mymachines.c175 size_t sz; in _nss_mymachines_gethostbyname4_r() local
181 r = sd_bus_message_read_array(reply, 'y', &a, &sz); in _nss_mymachines_gethostbyname4_r()
194 if (sz != FAMILY_ADDRESS_SIZE(family)) { in _nss_mymachines_gethostbyname4_r()
204 memcpy(r_tuple->addr, a, sz); in _nss_mymachines_gethostbyname4_r()
335 size_t sz; in _nss_mymachines_gethostbyname3_r() local
341 r = sd_bus_message_read_array(reply, 'y', &a, &sz); in _nss_mymachines_gethostbyname3_r()
352 if (sz != alen) { in _nss_mymachines_gethostbyname3_r()
/systemd-251/src/network/
Dnetworkd-dhcp-common.c139 size_t sz; in get_product_uuid_handler() local
157 r = sd_bus_message_read_array(m, 'y', &a, &sz); in get_product_uuid_handler()
163 if (sz != sizeof(sd_id128_t)) { in get_product_uuid_handler()
170 memcpy(&manager->duid_product_uuid.raw_data, a, sz); in get_product_uuid_handler()
171 manager->duid_product_uuid.raw_data_len = sz; in get_product_uuid_handler()
695 ssize_t sz; in config_parse_dhcp_send_option() local
790 sz = sizeof(uint8_t); in config_parse_dhcp_send_option()
805 sz = sizeof(uint16_t); in config_parse_dhcp_send_option()
820 sz = sizeof(uint32_t); in config_parse_dhcp_send_option()
833 sz = sizeof(addr.in.s_addr); in config_parse_dhcp_send_option()
[all …]
Dnetworkd-lldp-rx.c145 size_t sz; in link_lldp_save() local
147 r = sd_lldp_neighbor_get_raw(l[i], &p, &sz); in link_lldp_save()
151 u = htole64(sz); in link_lldp_save()
153 (void) fwrite(p, 1, sz, f); in link_lldp_save()
/systemd-251/src/journal/
Dmanaged-journal-file.c42 uint64_t offset, sz, n_items = 0, n_unused; in managed_journal_file_entry_array_punch_hole() local
71 sz = p + le64toh(o.object.size) - offset; in managed_journal_file_entry_array_punch_hole()
73 if (sz < MINIMUM_HOLE_SIZE) in managed_journal_file_entry_array_punch_hole()
95 if (fallocate(f->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, sz) < 0) { in managed_journal_file_entry_array_punch_hole()
109 uint64_t p, sz; in managed_journal_file_punch_holes() local
119 sz = le64toh(f->header->data_hash_table_size); in managed_journal_file_punch_holes()
121 for (uint64_t i = p; i < p + sz && n > 0; i += n) { in managed_journal_file_punch_holes()
122 size_t m = MIN(sizeof(items), p + sz - i); in managed_journal_file_punch_holes()
/systemd-251/src/libsystemd/sd-journal/
Djournal-file.c110 uint64_t sz; in journal_file_tail_end_by_pread() local
116 sz = le64toh(tail.object.size); in journal_file_tail_end_by_pread()
117 if (sz > UINT64_MAX - sizeof(uint64_t) + 1) in journal_file_tail_end_by_pread()
120 sz = ALIGN64(sz); in journal_file_tail_end_by_pread()
121 if (p > UINT64_MAX - sz) in journal_file_tail_end_by_pread()
124 p += sz; in journal_file_tail_end_by_pread()
147 uint64_t sz; in journal_file_tail_end_by_mmap() local
153 sz = le64toh(READ_NOW(tail->object.size)); in journal_file_tail_end_by_mmap()
154 if (sz > UINT64_MAX - sizeof(uint64_t) + 1) in journal_file_tail_end_by_mmap()
157 sz = ALIGN64(sz); in journal_file_tail_end_by_mmap()
[all …]

12345