Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 29) sorted by relevance

12

/systemd-251/src/journal-remote/
Djournal-upload-journal.c21 size_t pos = 0; in write_entry() local
35 r = snprintf(buf + pos, size - pos, in write_entry()
38 if ((size_t) r > size - pos) in write_entry()
40 return pos; in write_entry()
44 if (pos + r == size) { in write_entry()
50 pos += r; in write_entry()
60 r = snprintf(buf + pos, size - pos, in write_entry()
63 if ((size_t) r > size - pos) in write_entry()
65 return pos; in write_entry()
69 if (r + pos == size) { in write_entry()
[all …]
Djournal-gatewayd.c146 uint64_t pos, in request_reader_entries() argument
157 assert(pos >= m->delta); in request_reader_entries()
159 pos -= m->delta; in request_reader_entries()
161 while (pos >= m->size) { in request_reader_entries()
211 pos -= m->size; in request_reader_entries()
244 if (fseeko(m->tmp, pos, SEEK_SET) < 0) { in request_reader_entries()
249 n = m->size - pos; in request_reader_entries()
540 uint64_t pos, in request_reader_fields() argument
551 assert(pos >= m->delta); in request_reader_fields()
553 pos -= m->delta; in request_reader_fields()
[all …]
/systemd-251/src/udev/fido_id/
Dfido_id_desc.c34 for (size_t pos = 0; pos < desc_len; ) { in is_fido_security_token_desc() local
40 if (desc[pos] == HID_RPTDESC_FIRST_BYTE_LONG_ITEM) { in is_fido_security_token_desc()
45 if (pos + 1 >= desc_len) in is_fido_security_token_desc()
47 pos += desc[pos + 1] + 3; in is_fido_security_token_desc()
52 tag = desc[pos] >> 4; /* Bits 7 to 4 */ in is_fido_security_token_desc()
53 type = (desc[pos] >> 2) & 0x3; /* Bits 3 and 2 */ in is_fido_security_token_desc()
54 size_code = desc[pos] & 0x3; /* Bits 1 and 0 */ in is_fido_security_token_desc()
60 pos++; in is_fido_security_token_desc()
63 if (pos + size > desc_len) in is_fido_security_token_desc()
67 value |= (uint32_t) desc[pos + i] << (8 * i); in is_fido_security_token_desc()
[all …]
/systemd-251/src/libsystemd-network/
Dtest-dhcp-option.c25 int pos; member
161 while (desc->pos >= 0 || desc->filepos >= 0 || desc->snamepos >= 0) { in test_options_cb()
163 if (desc->pos >= 0) { in test_options_cb()
166 descpos = &desc->pos; in test_options_cb()
218 if (desc->pos != -1 && desc->pos == desc->len) in test_options_cb()
219 desc->pos = -1; in test_options_cb()
254 desc->pos = 0; in test_options()
265 assert_se(desc->pos == -1 && desc->filepos == -1 && desc->snamepos == -1); in test_options()
294 size_t offset = 0, len, pos; in test_option_set() local
316 offset = pos = 4; in test_option_set()
[all …]
Dsd-dhcp-lease.c832 size_t pos = 0, cnt = 0; in dhcp_lease_parse_search_domains() local
838 while (pos < len) { in dhcp_lease_parse_search_domains()
841 size_t jump_barrier = pos, next_chunk = 0; in dhcp_lease_parse_search_domains()
846 c = option[pos++]; in dhcp_lease_parse_search_domains()
855 label = (const char*) (option + pos); in dhcp_lease_parse_search_domains()
856 pos += c; in dhcp_lease_parse_search_domains()
857 if (pos >= len) in dhcp_lease_parse_search_domains()
879 if (pos >= len) in dhcp_lease_parse_search_domains()
882 d = option[pos++]; in dhcp_lease_parse_search_domains()
892 next_chunk = pos; in dhcp_lease_parse_search_domains()
[all …]
Dtest-dhcp6-client.c198 size_t offset, pos, optlen, outlen = sizeof(result); in TEST() local
230 pos = 7; in TEST()
232 out = &result[pos]; in TEST()
236 pos += 4 + optlen; in TEST()
237 assert_se(out == &result[pos]); in TEST()
248 pos += 4 + optlen; in TEST()
249 assert_se(out == &result[pos]); in TEST()
/systemd-251/src/login/
Dlogind-seat.c268 static Session* seat_get_position(Seat *s, unsigned pos) { in seat_get_position() argument
271 if (pos >= MALLOC_ELEMENTSOF(s->positions)) in seat_get_position()
274 return s->positions[pos]; in seat_get_position()
476 unsigned pos = session->position; in seat_evict_position() local
480 if (pos == 0) in seat_evict_position()
483 if (pos < MALLOC_ELEMENTSOF(s->positions) && s->positions[pos] == session) { in seat_evict_position()
484 s->positions[pos] = NULL; in seat_evict_position()
490 if (iter->position == pos && session_get_state(iter) != SESSION_CLOSING) { in seat_evict_position()
491 s->positions[pos] = iter; in seat_evict_position()
497 void seat_claim_position(Seat *s, Session *session, unsigned pos) { in seat_claim_position() argument
[all …]
Dlogind-seat.h49 void seat_claim_position(Seat *s, Session *session, unsigned pos);
/systemd-251/src/shared/
Dserialize.c147 int r, pos; in deserialize_dual_timestamp() local
152 pos = strspn(value, WHITESPACE); in deserialize_dual_timestamp()
153 if (value[pos] == '-') in deserialize_dual_timestamp()
155 pos += strspn(value + pos, DIGITS); in deserialize_dual_timestamp()
156 pos += strspn(value + pos, WHITESPACE); in deserialize_dual_timestamp()
157 if (value[pos] == '-') in deserialize_dual_timestamp()
160 r = sscanf(value, "%" PRIu64 "%" PRIu64 "%n", &a, &b, &pos); in deserialize_dual_timestamp()
166 if (value[pos] != '\0') in deserialize_dual_timestamp()
Dlogs-show.c224 const char *pos, *end; in print_multiline() local
242 for (pos = message; in print_multiline()
243 pos < message + message_len; in print_multiline()
244 pos = end + 1, line++) { in print_multiline()
248 for (end = pos; end < message + message_len && *end != '\n'; end++) in print_multiline()
250 len = end - pos; in print_multiline()
265 (size_t) (pos - message) <= highlight[0] && in print_multiline()
270 color_on, (int) highlight[0], pos); in print_multiline()
274 pos + highlight[0]); in print_multiline()
279 pos + highlight[1]); in print_multiline()
[all …]
Dhwdb-util.c361 int64_t pos; in trie_store() local
389 pos = ftello(t.f); in trie_store()
390 h.nodes_len = htole64(pos - sizeof(struct trie_header_f)); in trie_store()
482 char *pos; in import_file() local
497 pos = strchr(line, '#'); in import_file()
498 if (pos) in import_file()
499 pos[0] = '\0'; in import_file()
/systemd-251/src/basic/
Dcompress.c304 assert(output.pos >= size); in decompress_blob_zstd()
511 assert(output.pos >= prefix_len + 1); in decompress_startswith_zstd()
888 .pos = 0 in compress_stream_zstd()
904 .pos = 0 in compress_stream_zstd()
922 if (left < output.pos) in compress_stream_zstd()
925 wrote = loop_write(fdt, output.dst, output.pos, 1); in compress_stream_zstd()
929 left -= output.pos; in compress_stream_zstd()
936 finished = is_last_chunk ? (remaining == 0) : (input.pos == input.size); in compress_stream_zstd()
940 assert(input.pos == input.size); in compress_stream_zstd()
992 .pos = 0 in decompress_stream_zstd()
[all …]
/systemd-251/src/udev/
Dudevadm-trigger.c191 char *buf, *pos; in keyval() local
197 pos = strchr(buf, '='); in keyval()
198 if (pos) { in keyval()
199 pos[0] = 0; in keyval()
200 pos++; in keyval()
204 *val = pos; in keyval()
Dudev-builtin-usb_id.c140 size_t pos = 0; in dev_if_packed_info() local
172 while (pos + sizeof(struct usb_interface_descriptor) < (size_t) size && in dev_if_packed_info()
178 desc = (struct usb_interface_descriptor *) (buf + pos); in dev_if_packed_info()
184 pos += desc->bLength; in dev_if_packed_info()
Dudev-builtin-path_id.c310 const char *name, *base, *pos; in handle_scsi_default() local
345 pos = strrchr(base, '/'); in handle_scsi_default()
346 if (!pos) in handle_scsi_default()
349 base = strndupa_safe(base, pos - base); in handle_scsi_default()
/systemd-251/src/libsystemd/sd-login/
Dtest-login.c19 int pos = 0, inc; in format_uids() local
25 sprintf(*buf + pos, "%s"UID_FMT"%n", k > 0 ? " " : "", uids[k], &inc); in format_uids()
26 pos += inc; in format_uids()
29 assert_se(pos < (ssize_t)size); in format_uids()
30 (*buf)[pos] = '\0'; in format_uids()
/systemd-251/src/network/
Dnetworkctl.c134 size_t pos; in dump_link_description() local
140 if (!strv_fnmatch_full(patterns, ifindex_str, 0, &pos) && in dump_link_description()
141 !strv_fnmatch_full(patterns, name, 0, &pos)) { in dump_link_description()
146 if (strv_fnmatch_full(patterns, json_variant_string(a), 0, &pos)) { in dump_link_description()
155 matched_patterns[pos] = true; in dump_link_description()
162 for (size_t pos = 0; pos < strv_length(patterns); pos++) { in dump_link_description() local
163 if (matched_patterns[pos]) in dump_link_description()
166 if (string_is_glob(patterns[pos])) in dump_link_description()
168 patterns[pos]); in dump_link_description()
171 "Interface \"%s\" not found.", patterns[pos]); in dump_link_description()
[all …]
/systemd-251/src/core/
Dmain.c1455 size_t pos = 7; in become_shutdown() local
1459 assert(!command_line[pos]); in become_shutdown()
1470 command_line[pos++] = "kmsg"; in become_shutdown()
1474 command_line[pos++] = "null"; in become_shutdown()
1479 command_line[pos++] = "console"; in become_shutdown()
1484 command_line[pos++] = "--log-color"; in become_shutdown()
1487 command_line[pos++] = "--log-location"; in become_shutdown()
1490 command_line[pos++] = "--log-time"; in become_shutdown()
1493 command_line[pos++] = "--exit-code"; in become_shutdown()
1494 command_line[pos++] = exit_code; in become_shutdown()
[all …]
Dmanager.c168 static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) { in draw_cylon() argument
172 assert(pos <= width+1); /* 0 or width+1 mean that the center light is behind the corner */ in draw_cylon()
174 if (pos > 1) { in draw_cylon()
175 if (pos > 2) in draw_cylon()
176 p = mempset(p, ' ', pos-2); in draw_cylon()
182 if (pos > 0 && pos <= width) { in draw_cylon()
191 if (pos < width) { in draw_cylon()
195 if (pos < width-1) in draw_cylon()
196 p = mempset(p, ' ', width-1-pos); in draw_cylon()
/systemd-251/src/resolve/
Dresolved-dnstls-openssl.c344 for (size_t i = 0, pos = 0; i < iovcnt; pos += iov[i].iov_len, i++) in dnstls_stream_writev() local
345 memcpy(buf + pos, iov[i].iov_base, iov[i].iov_len); in dnstls_stream_writev()
Dresolved-dns-packet.c1830 size_t pos; in dns_packet_read_rr() local
1832 r = dns_packet_read_uint8(p, &t, &pos); in dns_packet_read_rr()
1874 dns_packet_rewind(p, pos); in dns_packet_read_rr()
/systemd-251/src/boot/efi/
Dboot.c1074 UINTN *pos, in line_get_key_value() argument
1083 assert(pos); in line_get_key_value()
1088 line = content + *pos; in line_get_key_value()
1097 *pos += linelen; in line_get_key_value()
1098 if (content[*pos]) in line_get_key_value()
1099 (*pos)++; in line_get_key_value()
1147 UINTN pos = 0; in config_defaults_load_from_file() local
1154 while ((line = line_get_key_value(content, (CHAR8 *)" \t", &pos, &key, &value))) { in config_defaults_load_from_file()
1433 UINTN pos = 0; in config_entry_add_from_file() local
1451 while ((line = line_get_key_value(content, (CHAR8 *)" \t", &pos, &key, &value))) { in config_entry_add_from_file()
[all …]
/systemd-251/src/test/
Dtest-strv.c954 size_t pos; in TEST() local
960 assert_se(strv_fnmatch_full(v, "\\", FNM_NOESCAPE, &pos)); in TEST()
961 assert_se(pos == 1); in TEST()
/systemd-251/src/tmpfiles/
Dtmpfiles.c2935 int r, pos; in parse_line() local
2998 for (pos = 1; action[pos]; pos++) { in parse_line()
2999 if (action[pos] == '!' && !boot) in parse_line()
3001 else if (action[pos] == '+' && !append_or_force) in parse_line()
3003 else if (action[pos] == '-' && !allow_failure) in parse_line()
3005 else if (action[pos] == '=' && !try_replace) in parse_line()
/systemd-251/src/sysusers/
Dsysusers.c1976 unsigned pos = 1; in parse_arguments() local
1982 r = parse_line("(argument)", pos, *arg); in parse_arguments()
1988 pos++; in parse_arguments()

12