/systemd-251/src/nss-systemd/ |
D | userdb-glue.c | 36 required = strlen(hr->user_name) + 1; in nss_pack_user_record() 41 required += strlen(rn) + 1; in nss_pack_user_record() 44 required += strlen(hd) + 1; in nss_pack_user_record() 47 required += strlen(shell) + 1; in nss_pack_user_record() 147 required = strlen(hr->user_name) + 1; in nss_pack_user_record_shadow() 150 required += strlen(hashed) + 1; in nss_pack_user_record_shadow() 227 required = strlen(g->group_name) + 1; in nss_pack_group_record() 231 required += strlen(*m) + 1; in nss_pack_group_record() 239 required += strlen(*m) + 1; in nss_pack_group_record() 425 required = strlen(hr->group_name) + 1; in nss_pack_group_record_shadow() [all …]
|
D | nss-systemd.c | 158 required = strlen(src->pw_name) + 1; in copy_synthesized_passwd() 159 required += strlen(src->pw_passwd) + 1; in copy_synthesized_passwd() 160 required += strlen(src->pw_gecos) + 1; in copy_synthesized_passwd() 161 required += strlen(src->pw_dir) + 1; in copy_synthesized_passwd() 162 required += strlen(src->pw_shell) + 1; in copy_synthesized_passwd() 197 required = strlen(src->sp_namp) + 1; in copy_synthesized_spwd() 198 required += strlen(src->sp_pwdp) + 1; in copy_synthesized_spwd() 232 required = strlen(src->gr_name) + 1; in copy_synthesized_group() 233 required += strlen(src->gr_passwd) + 1; in copy_synthesized_group() 267 required = strlen(src->sg_namp) + 1; in copy_synthesized_sgrp() [all …]
|
/systemd-251/src/resolve/ |
D | resolved-dnssd.c | 282 length = strlen(key); in dnssd_txt_item_new_from_string() 285 length += strlen(value) + 1; /* length of value plus '=' */ in dnssd_txt_item_new_from_string() 291 memcpy(i->data, key, strlen(key)); in dnssd_txt_item_new_from_string() 293 memcpy(i->data + strlen(key), "=", 1); in dnssd_txt_item_new_from_string() 294 memcpy(i->data + strlen(key) + 1, value, strlen(value)); in dnssd_txt_item_new_from_string() 307 length = strlen(key); in dnssd_txt_item_new_from_data() 316 memcpy(i->data, key, strlen(key)); in dnssd_txt_item_new_from_data() 318 memcpy(i->data + strlen(key), "=", 1); in dnssd_txt_item_new_from_data() 319 memcpy(i->data + strlen(key) + 1, data, size); in dnssd_txt_item_new_from_data()
|
/systemd-251/src/test/ |
D | test-escape.c | 42 … assert_se(strlen(t) == i || strlen(t) == i - 1 || strlen(t) == i - 2 || strlen(t) == i - 3); in test_xescape_full_one() 47 assert_se(strlen(t) == i); in test_xescape_full_one() 57 assert_se(strlen(q) <= i); in test_xescape_full_one() 58 assert_se(strlen(q) + 3 >= strlen(t)); in test_xescape_full_one()
|
D | test-sd-hwdb.c | 44 len1 += strlen(key) + strlen(value); in TEST() 49 len2 += strlen(key) + strlen(value); in TEST()
|
D | test-hexdecoct.c | 86 l = strlen(s); in test_unhexmem_one() 103 test_unhexmem_one(hex_invalid, strlen(hex_invalid), -EINVAL); in TEST() 105 test_unhexmem_one(hex, strlen(hex) - 1, -EPIPE); in TEST() 106 test_unhexmem_one(hex, strlen(hex), 0); in TEST() 108 test_unhexmem_one(hex_space, strlen(hex_space), 0); in TEST() 300 assert_se((size_t) l == strlen(encoded)); in TEST() 318 assert_se(size == strlen(output)); in test_unbase64mem_one()
|
D | test-udev-util.c | 26 assert_se(endpos == str + strlen(in)); in test_udev_rule_parse_value_one() 83 assert_se((size_t) r == strlen(expected)); in test_udev_replace_whitespace_one_len() 88 test_udev_replace_whitespace_one_len(str, strlen(str), expected); in test_udev_replace_whitespace_one()
|
/systemd-251/src/basic/ |
D | unit-name.c | 53 if (strlen(n) >= UNIT_NAME_MAX) in unit_name_is_valid() 236 b = strlen(suffix); in unit_name_change_suffix() 339 r = new(char, strlen(f)*4+1); in unit_name_escape() 476 b = strlen(i); in unit_name_replace_instance() 478 s = new(char, a + 1 + b + strlen(e) + 1); in unit_name_replace_instance() 508 s = new(char, a + 1 + strlen(e) + 1); in unit_name_template() 546 if (strlen(name) < UNIT_NAME_MAX) in unit_name_hash_long() 562 assert_se(strlen(hash) == UNIT_NAME_HASH_LENGTH_CHARS); in unit_name_hash_long() 564 len = UNIT_NAME_MAX - 1 - strlen(suffix+1) - UNIT_NAME_HASH_LENGTH_CHARS - 2; in unit_name_hash_long() 599 if (strlen(s) >= UNIT_NAME_MAX) { in unit_name_from_path() [all …]
|
D | string-util.c | 34 sl = strlen(s); in first_word() 35 wl = strlen(word); in first_word() 73 a = strlen(s); in strnappend() 97 n = strlen(t); in strjoin_real() 535 old_len = strlen(old_string); in strreplace() 536 new_len = strlen(new_string); in strreplace() 538 l = strlen(text); in strreplace() 615 isz = _isz ? *_isz : strlen(*ibuf); in strip_tab_ansi() 745 n = strlen(t); in strextend_with_separator_internal() 809 m = strlen(*x); in strextendf_with_separator() [all …]
|
D | string-util.h | 96 _len_ += strlen(_appendees_[_i_]); \ 149 return ellipsize_mem(s, strlen(s), length, percent); in ellipsize() 188 return strlen(s); in strlen_ptr() 203 size_t n = strlen(token); in memory_startswith_no_case() 222 return realloc(p, strlen(p) + 1) ?: p; in str_realloc()
|
D | replace-var.c | 47 l = strlen(text); in replace_var() 72 skip = strlen(v) + 2; in replace_var() 75 nl = l - skip + strlen(n); in replace_var()
|
D | escape.c | 103 return cescape_length(s, strlen(s)); in cescape() 378 ans = new(char, MIN(strlen(s), console_width) * 4 + 1); in xescape_full() 382 memset(ans, '_', MIN(strlen(s), console_width) * 4); in xescape_full() 383 ans[MIN(strlen(s), console_width) * 4] = 0; in xescape_full() 493 buf = new(char, strlen(s)*4+1); in shell_escape() 522 buf = new(char, FLAGS_SET(flags, SHELL_ESCAPE_POSIX) + 1 + strlen(s)*4 + 1 + 1); in shell_maybe_quote()
|
D | utf8.c | 179 p = s = malloc(strlen(str) * 4 + 1); in utf8_escape_invalid() 222 p = s = prev_s = malloc(strlen(str) * 4 + 1); in utf8_escape_non_printable_full() 269 … s = mempcpy(s, UTF8_REPLACEMENT_CHARACTER, strlen(UTF8_REPLACEMENT_CHARACTER)); in utf8_escape_non_printable_full() 282 s = mempcpy(s, "…", strlen("…")); in utf8_escape_non_printable_full() 319 _cleanup_free_ char *ans = new(char, strlen(str) + 1); in utf8_to_ascii()
|
/systemd-251/src/fundamental/ |
D | string-util-fundamental.c | 16 l = strlen(prefix); in startswith() 30 l = strlen(prefix); in startswith_no_case() 44 sl = strlen(s); in endswith() 45 pl = strlen(postfix); in endswith() 65 sl = strlen(s); in endswith_no_case() 66 pl = strlen(postfix); in endswith_no_case()
|
/systemd-251/src/boot/efi/ |
D | util.c | 302 UINTN strlen; in xstra_to_str() local 312 strlen = 0; in xstra_to_str() 317 utf8len = utf8_to_16(stra + i, str + strlen); in xstra_to_str() 324 strlen++; in xstra_to_str() 327 str[strlen] = '\0'; in xstra_to_str() 333 UINTN strlen; in xstra_to_path() local 343 strlen = 1; in xstra_to_path() 348 utf8len = utf8_to_16(stra + i, str + strlen); in xstra_to_path() 355 if (str[strlen] == '/') in xstra_to_path() 356 str[strlen] = '\\'; in xstra_to_path() [all …]
|
/systemd-251/coccinelle/ |
D | isempty.cocci | 20 - strlen@p(s) == 0 23 - strlen@p(s) <= 0 26 - strlen@p(s) > 0 29 - strlen@p(s) != 0
|
/systemd-251/src/shared/ |
D | fstab-util.c | 174 if (end < word + strlen(name)) in fstab_filter_options() 176 if (!strneq(word, name, strlen(name))) in fstab_filter_options() 180 x = word + strlen(name); in fstab_filter_options() 243 l = strlen(s); in unquote() 261 enc_len = strlen(u) * 4 + 1; in tag_to_udev_node()
|
D | ask-password-api.c | 194 … m = strlen(str); /* Not a valid UTF-8 string? If so, let's backspace the number of bytes in backspace_string() 249 } else if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0) in ask_password_plymouth() 315 … if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0) { in ask_password_plymouth() 449 (void) loop_write(ttyfd, message, strlen(message), false); in ask_password_tty() 454 (void) loop_write(ttyfd, ansi_grey(), strlen(ansi_grey()), false); in ask_password_tty() 455 (void) loop_write(ttyfd, PRESS_TAB, strlen(PRESS_TAB), false); in ask_password_tty() 536 backspace_chars(ttyfd, strlen(PRESS_TAB)); in ask_password_tty() 546 (void) loop_write(ttyfd, SKIPPED, strlen(SKIPPED), false); in ask_password_tty() 596 (void) loop_write(ttyfd, NO_ECHO, strlen(NO_ECHO), false); in ask_password_tty() 609 (void) loop_write(ttyfd, NO_ECHO, strlen(NO_ECHO), false); in ask_password_tty()
|
D | pager.c | 208 … r = loop_write(exe_name_pipe[1], pager_args[0], strlen(pager_args[0]) + 1, false); in pager_open() 227 r = loop_write(exe_name_pipe[1], exe, strlen(exe) + 1, false); in pager_open() 238 r = loop_write(exe_name_pipe[1], "(built-in)", strlen("(built-in)") + 1, false); in pager_open() 305 k = strlen(desc); in show_man_page()
|
D | logs-show.c | 165 .field_len = strlen(_field), \ 409 assert(sizeof(buf) > strlen(buf)); in output_timestamp_realtime() 410 k = sizeof(buf) - strlen(buf); in output_timestamp_realtime() 412 r = snprintf(buf + strlen(buf), k, ".%06"PRIu64, x % USEC_PER_SEC); in output_timestamp_realtime() 425 return (int) strlen(buf); in output_timestamp_realtime() 599 size_t urlified_len = strlen(urlified); in output_short() 716 valuelen = strlen(urlified); in output_verbose() 907 if (!(flags & OUTPUT_SHOW_ALL) && strlen(name) + 1 + size >= JSON_THRESHOLD) in update_json_data() 1022 r = update_json_data(h, flags, "__CURSOR", cursor, strlen(cursor)); in output_json() 1027 r = update_json_data(h, flags, "__REALTIME_TIMESTAMP", usecbuf, strlen(usecbuf)); in output_json() [all …]
|
D | serialize.c | 26 if (strlen(key) + 1 + strlen(value) + 1 > LONG_LINE_MAX) { in serialize_item() 68 if (k < 0 || (size_t) k >= sizeof(buf) || strlen(key) + 1 + k + 1 > LONG_LINE_MAX) { in serialize_item_format()
|
/systemd-251/src/udev/ |
D | test-udev-node.c | 12 assert_se(r == strlen(expected)); in test_udev_node_escape_path_one() 28 memcpy(a, "/disk/by-id/", strlen("/disk/by-id/")); in TEST() 32 memcpy(b, "\\x2fdisk\\x2fby-id\\x2f", strlen("\\x2fdisk\\x2fby-id\\x2f")); in TEST()
|
D | udev-builtin-net_id.c | 565 if (strlen(syspath) < STRLEN(PLATFORM_TEST) + 1) in names_platform() 645 … if (strlen(vf_names.pci_onboard) + strlen(virtfn_suffix) < sizeof(names->pci_onboard)) in names_pci() 649 … if (strlen(vf_names.pci_slot) + strlen(virtfn_suffix) < sizeof(names->pci_slot)) in names_pci() 653 … if (strlen(vf_names.pci_path) + strlen(virtfn_suffix) < sizeof(names->pci_path)) in names_pci() 722 … (int) strlen(ports), sysname + (ports - name), config, interf, names->usb_ports); in names_usb() 798 bus_id_len = strlen(bus_id); in names_ccw() 1031 HW_ADDR_TO_STR(&info.hw_addr), str + strlen(prefix)); in builtin_net_id()
|
/systemd-251/src/libsystemd/sd-journal/ |
D | catalog.c | 108 l1 = strlen(one); in combine_entries() 109 l2 = strlen(two); in combine_entries() 160 assert(strlen(language) > 1 && strlen(language) < 32); in finish_item() 221 c = strlen(t); in catalog_entry_lang() 290 strlen(line) >= 2+1+32 && in catalog_import_file() 344 line_len = strlen(line); in catalog_import_file() 484 offset = strbuf_add_string(sb, payload, strlen(payload)); in catalog_update()
|
/systemd-251/src/home/ |
D | user-record-sign.c | 58 if (EVP_DigestSign(md_ctx, NULL, &signature_size, (uint8_t*) text, strlen(text)) <= 0) in user_record_sign() 65 if (EVP_DigestSign(md_ctx, signature, &signature_size, (uint8_t*) text, strlen(text)) <= 0) in user_record_sign() 153 … if (EVP_DigestVerify(md_ctx, signature, signature_size, (uint8_t*) text, strlen(text)) <= 0) { in user_record_verify()
|