/systemd-251/src/test/ |
D | test-unaligned.c | 8 static uint8_t data[] = { variable 16 assert_se(unaligned_read_be16(&data[0]) == 0x0001); in TEST() 17 assert_se(unaligned_read_be16(&data[1]) == 0x0102); in TEST() 19 assert_se(unaligned_read_be32(&data[0]) == 0x00010203); in TEST() 20 assert_se(unaligned_read_be32(&data[1]) == 0x01020304); in TEST() 21 assert_se(unaligned_read_be32(&data[2]) == 0x02030405); in TEST() 22 assert_se(unaligned_read_be32(&data[3]) == 0x03040506); in TEST() 24 assert_se(unaligned_read_be64(&data[0]) == 0x0001020304050607); in TEST() 25 assert_se(unaligned_read_be64(&data[1]) == 0x0102030405060708); in TEST() 26 assert_se(unaligned_read_be64(&data[2]) == 0x0203040506070809); in TEST() [all …]
|
D | test-env-file.c | 66 _cleanup_strv_free_ char **data = NULL; in TEST() local 67 assert_se(load_env_file(NULL, name, &data) == 0); in TEST() 68 assert_se(streq(data[0], "a=a")); in TEST() 69 assert_se(streq(data[1], "b=bc")); in TEST() 70 assert_se(streq(data[2], "d=de f")); in TEST() 71 assert_se(streq(data[3], "g=g ")); in TEST() 72 assert_se(streq(data[4], "h=ąęół śćńźżµ")); in TEST() 73 assert_se(streq(data[5], "i=i")); in TEST() 74 assert_se(data[6] == NULL); in TEST() 81 _cleanup_strv_free_ char **data = NULL; in TEST() local [all …]
|
D | test-compress.c | 53 const char *data, in test_compress_decompress() argument 63 compression, data); in test_compress_decompress() 65 r = compress(data, data_len, compressed, sizeof(compressed), &csize); in test_compress_decompress() 75 assert_se(memcmp(decompressed, data, data_len) == 0); in test_compress_decompress() 97 const char *data, in test_decompress_startswith() argument 107 compression, data); in test_decompress_startswith() 114 r = compress(data, data_len, compressed, BUFSIZE_1, &csize); in test_decompress_startswith() 121 r = compress(data, data_len, compressed, BUFSIZE_2, &csize); in test_decompress_startswith() 125 len = strlen(data); in test_decompress_startswith() 127 r = decompress_sw(compressed, csize, (void **) &decompressed, data, len, '\0'); in test_decompress_startswith() [all …]
|
/systemd-251/src/shared/ |
D | specifier.h | 6 typedef int (*SpecifierCallback)(char specifier, const void *data, const char *root, const void *us… 11 const void *data; member 16 int specifier_string(char specifier, const void *data, const char *root, const void *userdata, char… 17 int specifier_real_path(char specifier, const void *data, const char *root, const void *userdata, c… 18 int specifier_real_directory(char specifier, const void *data, const char *root, const void *userda… 20 int specifier_machine_id(char specifier, const void *data, const char *root, const void *userdata, … 21 int specifier_boot_id(char specifier, const void *data, const char *root, const void *userdata, cha… 22 int specifier_hostname(char specifier, const void *data, const char *root, const void *userdata, ch… 23 int specifier_short_hostname(char specifier, const void *data, const char *root, const void *userda… 24 int specifier_pretty_hostname(char specifier, const void *data, const char *root, const void *userd… [all …]
|
D | specifier.c | 70 r = i->lookup(i->specifier, i->data, root, userdata, &w); in specifier_printf() 114 int specifier_string(char specifier, const void *data, const char *root, const void *userdata, char… in specifier_string() argument 119 if (!isempty(data)) { in specifier_string() 120 n = strdup(data); in specifier_string() 129 int specifier_real_path(char specifier, const void *data, const char *root, const void *userdata, c… in specifier_real_path() argument 130 const char *path = data; in specifier_real_path() 140 int specifier_real_directory(char specifier, const void *data, const char *root, const void *userda… in specifier_real_directory() argument 146 r = specifier_real_path(specifier, data, root, userdata, &path); in specifier_real_directory() 154 int specifier_machine_id(char specifier, const void *data, const char *root, const void *userdata, … in specifier_machine_id() argument 183 int specifier_boot_id(char specifier, const void *data, const char *root, const void *userdata, cha… in specifier_boot_id() argument [all …]
|
D | conf-parser.c | 71 *ret_data = t->data; in config_item_table_lookup() 135 void *data = NULL; in next_assignment() local 144 r = lookup(table, section, lvalue, &func, <ype, &data, userdata); in next_assignment() 152 lvalue, ltype, rvalue, data, userdata); in next_assignment() 786 void *data, in config_parse_iec_size() argument 789 size_t *sz = data; in config_parse_iec_size() 796 assert(data); in config_parse_iec_size() 819 void *data, in config_parse_si_uint64() argument 822 uint64_t *sz = data; in config_parse_si_uint64() 828 assert(data); in config_parse_si_uint64() [all …]
|
D | logs-show.c | 127 static int parse_field(const void *data, size_t length, const char *field, size_t field_len, char *… in parse_field() argument 131 assert(data); in parse_field() 138 if (memcmp(data, field, field_len)) in parse_field() 143 buf = newdup_suffix0(char, (const char*) data + field_len, nl); in parse_field() 170 static int parse_fieldv(const void *data, size_t length, const ParseFieldVec *fields, unsigned n_fi… in parse_fieldv() argument 177 r = parse_field(data, length, f->field, f->field_len, f->target, f->target_len); in parse_fieldv() 438 const void *data; in output_short() local 477 JOURNAL_FOREACH_DATA_RETVAL(j, data, length, r) { in output_short() 478 r = parse_fieldv(data, length, fields, ELEMENTSOF(fields)); in output_short() 638 const void *data; in output_verbose() local [all …]
|
D | journal-importer.c | 113 static int fill_fixed_size(JournalImporter *imp, void **data, size_t size) { in fill_fixed_size() argument 121 assert(data); in fill_fixed_size() 146 *data = imp->buf + imp->offset; in fill_fixed_size() 154 void *data; in get_data_size() local 160 r = fill_fixed_size(imp, &data, sizeof(uint64_t)); in get_data_size() 164 imp->data_size = unaligned_read_le64(data); in get_data_size() 175 static int get_data_data(JournalImporter *imp, void **data) { in get_data_data() argument 179 assert(data); in get_data_data() 182 r = fill_fixed_size(imp, data, imp->data_size); in get_data_data() 191 char *data; in get_data_newline() local [all …]
|
D | format-table.c | 86 uint8_t data[0]; /* data is generic array */ member 140 TableData **data; member 239 table_data_unref(t->data[i]); in table_unref() 241 free(t->data); in table_unref() 255 static size_t table_data_size(TableDataType type, const void *data) { in table_data_size() argument 264 return strlen(data) + 1; in table_data_size() 335 const void *data, in table_data_matches() argument 371 k = table_data_size(type, data); in table_data_matches() 372 l = table_data_size(d->type, d->data); in table_data_matches() 376 return memcmp_safe(data, d->data, l) == 0; in table_data_matches() [all …]
|
/systemd-251/src/udev/dmi_memory_id/ |
D | dmi_memory_id.c | 75 const uint8_t *data; member 93 const char *bp = (const char *) dm->data; in dmi_string() 422 const uint8_t *data = h->data; in dmi_decode() local 434 if (data[0x05] != 0x03) /* 7.17.2, Use == "System Memory" */ in dmi_decode() 438 dmi_memory_array_location(data[0x04]); in dmi_decode() 439 dmi_memory_array_ec_type(data[0x06]); in dmi_decode() 440 if (DWORD(data + 0x07) != 0x80000000) in dmi_decode() 441 …dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, DWORD(data + 0x07), MEMORY_SIZE_UNIT_KB); in dmi_decode() 443 …dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, QWORD(data + 0x0F), MEMORY_SIZE_UNIT_BYT… in dmi_decode() 455 dmi_memory_device_width("TOTAL_WIDTH", slot_num, WORD(data + 0x08)); in dmi_decode() [all …]
|
/systemd-251/src/basic/ |
D | prioq.c | 21 void *data; member 75 SWAP_TWO(q->items[j].data, q->items[k].data); in swap() 94 if (q->compare_func(q->items[k].data, q->items[idx].data) <= 0) in shuffle_up() 116 if (q->compare_func(q->items[j].data, q->items[idx].data) < 0) in shuffle_down() 125 q->compare_func(q->items[k].data, q->items[s].data) < 0) in shuffle_down() 144 int prioq_put(Prioq *q, void *data, unsigned *idx) { in prioq_put() argument 165 i->data = data; in prioq_put() 176 int prioq_ensure_put(Prioq **q, compare_func_t compare_func, void *data, unsigned *idx) { in prioq_ensure_put() argument 183 return prioq_put(*q, data, idx); in prioq_ensure_put() 205 i->data = l->data; in remove_item() [all …]
|
/systemd-251/src/libsystemd/sd-netlink/ |
D | netlink-message.c | 175 static int add_rtattr(sd_netlink_message *m, unsigned short type, const void *data, size_t data_len… in add_rtattr() argument 185 assert(!data || data_length > 0); in add_rtattr() 203 rtattr_append_attribute_internal(rta, type, data, data_length); in add_rtattr() 234 int sd_netlink_message_append_string(sd_netlink_message *m, unsigned short type, const char *data) { in sd_netlink_message_append_string() argument 240 assert_return(data, -EINVAL); in sd_netlink_message_append_string() 247 length = strnlen(data, size+1); in sd_netlink_message_append_string() 251 length = strlen(data); in sd_netlink_message_append_string() 253 r = add_rtattr(m, type, data, length + 1); in sd_netlink_message_append_string() 260 int sd_netlink_message_append_strv(sd_netlink_message *m, unsigned short type, char * const *data) { in sd_netlink_message_append_strv() argument 266 assert_return(data, -EINVAL); in sd_netlink_message_append_strv() [all …]
|
/systemd-251/src/cryptsetup/cryptsetup-tokens/ |
D | luks2-pkcs11.c | 39 struct luks2_pkcs11_callback_data *data = userdata; in luks2_pkcs11_callback() local 45 assert(data); in luks2_pkcs11_callback() 52 … r = pkcs11_token_login_by_pin(m, session, token_info, token_label, data->pin, data->pin_size); in luks2_pkcs11_callback() 57 crypt_log_error(data->cd, in luks2_pkcs11_callback() 68 crypt_log_error(data->cd, "Please enter correct PIN for security token " in luks2_pkcs11_callback() 71 crypt_log_error(data->cd, "PIN has been entered incorrectly previously, " in luks2_pkcs11_callback() 90 data->encrypted_key, in luks2_pkcs11_callback() 91 data->encrypted_key_size, in luks2_pkcs11_callback() 92 &data->decrypted_key, in luks2_pkcs11_callback() 93 &data->decrypted_key_size); in luks2_pkcs11_callback() [all …]
|
/systemd-251/src/nspawn/ |
D | nspawn-oci.c | 252 } data = { in oci_rlimits() local 265 r = json_dispatch(e, table, oci_unexpected, flags, &data); in oci_rlimits() 269 assert(data.type >= 0); in oci_rlimits() 270 assert(data.type < _RLIMIT_MAX); in oci_rlimits() 272 if (s->rlimit[data.type]) in oci_rlimits() 276 s->rlimit[data.type] = new(struct rlimit, 1); in oci_rlimits() 277 if (!s->rlimit[data.type]) in oci_rlimits() 280 *s->rlimit[data.type] = (struct rlimit) { in oci_rlimits() 281 .rlim_cur = data.soft, in oci_rlimits() 282 .rlim_max = data.hard, in oci_rlimits() [all …]
|
D | nspawn-settings.c | 249 void *data, in config_parse_expose_port() argument 252 Settings *s = data; in config_parse_expose_port() 277 void *data, in config_parse_capability() argument 280 uint64_t u = 0, *result = data; in config_parse_capability() 326 void *data, in config_parse_pivot_root() argument 329 Settings *settings = data; in config_parse_pivot_root() 352 void *data, in config_parse_bind() argument 355 Settings *settings = data; in config_parse_bind() 378 void *data, in config_parse_tmpfs() argument 381 Settings *settings = data; in config_parse_tmpfs() [all …]
|
/systemd-251/src/core/ |
D | load-fragment.c | 87 int parse_crash_chvt(const char *value, int *data) { in parse_crash_chvt() argument 90 if (safe_atoi(value, data) >= 0) in parse_crash_chvt() 98 *data = 0; /* switch to where kmsg goes */ in parse_crash_chvt() 100 *data = -1; /* turn off switching */ in parse_crash_chvt() 242 void *data, in config_parse_unit_deps() argument 299 void *data, in config_parse_obsolete_unit_deps() argument 305 …arse_unit_deps(unit, filename, line, section, section_line, lvalue, ltype, rvalue, data, userdata); in config_parse_obsolete_unit_deps() 317 void *data, in config_parse_unit_string_printf() argument 335 …config_parse_string(unit, filename, line, section, section_line, lvalue, ltype, k, data, userdata); in config_parse_unit_string_printf() 347 void *data, in config_parse_unit_strv_printf() argument [all …]
|
D | unit-printf.c | 15 static int specifier_prefix_and_instance(char specifier, const void *data, const char *root, const … in specifier_prefix_and_instance() argument 21 static int specifier_prefix(char specifier, const void *data, const char *root, const void *userdat… in specifier_prefix() argument 27 static int specifier_prefix_unescaped(char specifier, const void *data, const char *root, const voi… in specifier_prefix_unescaped() argument 39 static int specifier_instance_unescaped(char specifier, const void *data, const char *root, const v… in specifier_instance_unescaped() argument 45 static int specifier_last_component(char specifier, const void *data, const char *root, const void … in specifier_last_component() argument 63 static int specifier_last_component_unescaped(char specifier, const void *data, const char *root, c… in specifier_last_component_unescaped() argument 67 r = specifier_last_component(specifier, data, root, userdata, &p); in specifier_last_component_unescaped() 74 static int specifier_filename(char specifier, const void *data, const char *root, const void *userd… in specifier_filename() argument 87 static int specifier_cgroup(char specifier, const void *data, const char *root, const void *userdat… in specifier_cgroup() argument 104 static int specifier_cgroup_root(char specifier, const void *data, const char *root, const void *us… in specifier_cgroup_root() argument [all …]
|
/systemd-251/src/libsystemd-network/ |
D | dhcp6-option.c | 219 if (optlen > 0xffff || *buflen < optlen + offsetof(DHCP6Option, data)) in option_append_hdr() 225 *buf += offsetof(DHCP6Option, data); in option_append_hdr() 226 *buflen -= offsetof(DHCP6Option, data); in option_append_hdr() 269 memcpy(p + 8, options->data, options->length); in dhcp6_option_append_vendor_option() 300 return offsetof(DHCP6Option, data) + sizeof(struct iaaddr); in option_append_ia_address() 328 return offsetof(DHCP6Option, data) + sizeof(struct iapdprefix); in option_append_pd_prefix() 365 if (*buflen < offsetof(DHCP6Option, data) + len) in dhcp6_option_append_ia() 372 *buf += offsetof(DHCP6Option, data); in dhcp6_option_append_ia() 373 *buflen -= offsetof(DHCP6Option, data); in dhcp6_option_append_ia() 508 if (buflen < offsetof(DHCP6Option, data)) in dhcp6_option_parse() [all …]
|
/systemd-251/src/hostname/ |
D | hostnamed.c | 68 char *data[_PROP_MAX]; member 86 c->data[p] = mfree(c->data[p]); in context_reset() 109 r = read_etc_hostname(NULL, &c->data[PROP_STATIC_HOSTNAME]); in context_read_etc_hostname() 136 "PRETTY_HOSTNAME", &c->data[PROP_PRETTY_HOSTNAME], in context_read_machine_info() 137 "ICON_NAME", &c->data[PROP_ICON_NAME], in context_read_machine_info() 138 "CHASSIS", &c->data[PROP_CHASSIS], in context_read_machine_info() 139 "DEPLOYMENT", &c->data[PROP_DEPLOYMENT], in context_read_machine_info() 140 "LOCATION", &c->data[PROP_LOCATION], in context_read_machine_info() 141 "HARDWARE_VENDOR", &c->data[PROP_HARDWARE_VENDOR], in context_read_machine_info() 142 "HARDWARE_MODEL", &c->data[PROP_HARDWARE_MODEL]); in context_read_machine_info() [all …]
|
/systemd-251/src/systemd/ |
D | sd-netlink.h | 75 int sd_netlink_message_append_string(sd_netlink_message *m, unsigned short type, const char *data); 76 int sd_netlink_message_append_strv(sd_netlink_message *m, unsigned short type, char * const *data); 78 int sd_netlink_message_append_u8(sd_netlink_message *m, unsigned short type, uint8_t data); 79 int sd_netlink_message_append_u16(sd_netlink_message *m, unsigned short type, uint16_t data); 80 int sd_netlink_message_append_u32(sd_netlink_message *m, unsigned short type, uint32_t data); 81 int sd_netlink_message_append_u64(sd_netlink_message *m, unsigned short type, uint64_t data); 82 int sd_netlink_message_append_s8(sd_netlink_message *m, unsigned short type, int8_t data); 83 int sd_netlink_message_append_s16(sd_netlink_message *m, unsigned short type, int16_t data); 84 int sd_netlink_message_append_s32(sd_netlink_message *m, unsigned short type, int32_t data); 85 int sd_netlink_message_append_s64(sd_netlink_message *m, unsigned short type, int64_t data); [all …]
|
/systemd-251/src/network/tc/ |
D | cake.c | 137 void *data, in config_parse_cake_bandwidth() argument 142 Network *network = data; in config_parse_cake_bandwidth() 149 assert(data); in config_parse_cake_bandwidth() 192 void *data, in config_parse_cake_overhead() argument 197 Network *network = data; in config_parse_cake_overhead() 204 assert(data); in config_parse_cake_overhead() 252 void *data, in config_parse_cake_mpu() argument 257 Network *network = data; in config_parse_cake_mpu() 264 assert(data); in config_parse_cake_mpu() 311 void *data, in config_parse_cake_tristate() argument [all …]
|
D | fq.c | 114 void *data, in config_parse_fair_queueing_u32() argument 119 Network *network = data; in config_parse_fair_queueing_u32() 126 assert(data); in config_parse_fair_queueing_u32() 179 void *data, in config_parse_fair_queueing_size() argument 184 Network *network = data; in config_parse_fair_queueing_size() 192 assert(data); in config_parse_fair_queueing_size() 248 void *data, in config_parse_fair_queueing_bool() argument 253 Network *network = data; in config_parse_fair_queueing_bool() 259 assert(data); in config_parse_fair_queueing_bool() 302 void *data, in config_parse_fair_queueing_usec() argument [all …]
|
/systemd-251/src/fuzz/ |
D | fuzz-compress.c | 17 uint8_t data[]; member 20 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { in LLVMFuzzerTestOneInput() argument 24 if (size < offsetof(header, data) + 1) in LLVMFuzzerTestOneInput() 27 const header *h = (struct header*) data; in LLVMFuzzerTestOneInput() 28 const size_t data_len = size - offsetof(header, data); in LLVMFuzzerTestOneInput() 48 r = compress_blob_explicit(alg, h->data, data_len, buf, size, &csize); in LLVMFuzzerTestOneInput() 65 r = decompress_startswith(alg, buf, csize, &buf2, h->data, sw_len, h->data[sw_len]); in LLVMFuzzerTestOneInput()
|
/systemd-251/src/cryptsetup/ |
D | cryptsetup-pkcs11.c | 41 … _cleanup_(pkcs11_crypt_device_callback_data_release) pkcs11_crypt_device_callback_data data = { in decrypt_pkcs11_key() 57 data.encrypted_key = (void*) key_data; in decrypt_pkcs11_key() 58 data.encrypted_key_size = key_data_size; in decrypt_pkcs11_key() 60 data.free_encrypted_key = false; in decrypt_pkcs11_key() 74 (char**) &data.encrypted_key, &data.encrypted_key_size); in decrypt_pkcs11_key() 78 data.free_encrypted_key = true; in decrypt_pkcs11_key() 81 r = pkcs11_find_token(pkcs11_uri, pkcs11_crypt_device_callback, &data); in decrypt_pkcs11_key() 85 *ret_decrypted_key = TAKE_PTR(data.decrypted_key); in decrypt_pkcs11_key() 86 *ret_decrypted_key_size = data.decrypted_key_size; in decrypt_pkcs11_key()
|
/systemd-251/src/home/ |
D | homework-pkcs11.c | 18 struct pkcs11_callback_data *data = userdata; in pkcs11_callback() local 30 assert(data); in pkcs11_callback() 48 if (data->secret->pkcs11_protected_authentication_path_permitted <= 0) in pkcs11_callback() 64 if (strv_isempty(data->secret->token_pin)) in pkcs11_callback() 67 STRV_FOREACH(i, data->secret->token_pin) { in pkcs11_callback() 95 …r = pkcs11_token_decrypt_data(m, session, object, data->encrypted_key->data, data->encrypted_key->… in pkcs11_callback() 99 if (base64mem(decrypted_key, decrypted_key_size, &data->decrypted_password) < 0) in pkcs11_callback()
|