/systemd-251/src/basic/ |
D | prioq.c | 22 unsigned *idx; member 72 assert(!q->items[j].idx || *(q->items[j].idx) == j); in swap() 73 assert(!q->items[k].idx || *(q->items[k].idx) == k); in swap() 76 SWAP_TWO(q->items[j].idx, q->items[k].idx); in swap() 78 if (q->items[j].idx) in swap() 79 *q->items[j].idx = j; in swap() 81 if (q->items[k].idx) in swap() 82 *q->items[k].idx = k; in swap() 85 static unsigned shuffle_up(Prioq *q, unsigned idx) { in shuffle_up() argument 87 assert(idx < q->n_items); in shuffle_up() [all …]
|
D | hashmap.c | 374 static struct hashmap_base_entry* bucket_at(HashmapBase *h, unsigned idx) { in bucket_at() argument 376 ((uint8_t*) storage_ptr(h) + idx * hashmap_type_info[h->type].entry_size); in bucket_at() 379 static struct plain_hashmap_entry* plain_bucket_at(Hashmap *h, unsigned idx) { in plain_bucket_at() argument 380 return (struct plain_hashmap_entry*) bucket_at(HASHMAP_BASE(h), idx); in plain_bucket_at() 383 static struct ordered_hashmap_entry* ordered_bucket_at(OrderedHashmap *h, unsigned idx) { in ordered_bucket_at() argument 384 return (struct ordered_hashmap_entry*) bucket_at(HASHMAP_BASE(h), idx); in ordered_bucket_at() 387 static struct set_entry *set_bucket_at(Set *h, unsigned idx) { in set_bucket_at() argument 388 return (struct set_entry*) bucket_at(HASHMAP_BASE(h), idx); in set_bucket_at() 391 static struct ordered_hashmap_entry* bucket_at_swap(struct swap_entries *swap, unsigned idx) { in bucket_at_swap() argument 392 return &swap->e[idx - _IDX_SWAP_BEGIN]; in bucket_at_swap() [all …]
|
D | sort-util.c | 9 size_t l, u, idx; in xbsearch_r() local 18 idx = (l + u) / 2; in xbsearch_r() 19 p = (const uint8_t*) base + idx * size; in xbsearch_r() 22 u = idx; in xbsearch_r() 24 l = idx + 1; in xbsearch_r()
|
D | prioq.h | 18 int prioq_put(Prioq *q, void *data, unsigned *idx); 19 int prioq_ensure_put(Prioq **q, compare_func_t compare_func, void *data, unsigned *idx); 20 int prioq_remove(Prioq *q, void *data, unsigned *idx); 21 int prioq_reshuffle(Prioq *q, void *data, unsigned *idx); 23 void *prioq_peek_by_index(Prioq *q, unsigned idx) _pure_;
|
D | hashmap.h | 43 unsigned idx; /* index of an entry to be iterated next */ member 53 #define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL }) 54 #define ITERATOR_IS_FIRST(i) ((i).idx == _IDX_ITERATOR_FIRST)
|
/systemd-251/src/nss-myhostname/ |
D | nss-myhostname.c | 43 size_t l, idx, ms; in _nss_myhostname_gethostbyname4_r() local 110 idx = ALIGN(l+1); in _nss_myhostname_gethostbyname4_r() 116 r_tuple = (struct gaih_addrtuple*) (buffer + idx); in _nss_myhostname_gethostbyname4_r() 123 idx += ALIGN(sizeof(struct gaih_addrtuple)); in _nss_myhostname_gethostbyname4_r() 128 r_tuple = (struct gaih_addrtuple*) (buffer + idx); in _nss_myhostname_gethostbyname4_r() 135 idx += ALIGN(sizeof(struct gaih_addrtuple)); in _nss_myhostname_gethostbyname4_r() 143 r_tuple = (struct gaih_addrtuple*) (buffer + idx); in _nss_myhostname_gethostbyname4_r() 150 idx += ALIGN(sizeof(struct gaih_addrtuple)); in _nss_myhostname_gethostbyname4_r() 155 assert(idx == ms); in _nss_myhostname_gethostbyname4_r() 189 size_t l_canonical, l_additional, idx, ms, alen; in fill_in_hostent() local [all …]
|
/systemd-251/src/nss-mymachines/ |
D | nss-mymachines.c | 102 size_t l, ms, idx; in _nss_mymachines_gethostbyname4_r() local 168 idx = ALIGN(l+1); in _nss_mymachines_gethostbyname4_r() 171 r_tuple_first = (struct gaih_addrtuple*) (buffer + idx); in _nss_mymachines_gethostbyname4_r() 199 r_tuple = (struct gaih_addrtuple*) (buffer + idx); in _nss_mymachines_gethostbyname4_r() 206 idx += ALIGN(sizeof(struct gaih_addrtuple)); in _nss_mymachines_gethostbyname4_r() 216 assert(idx == ms); in _nss_mymachines_gethostbyname4_r() 254 size_t l, idx, ms, alen; in _nss_mymachines_gethostbyname3_r() local 323 idx = ALIGN(l+1); in _nss_mymachines_gethostbyname3_r() 326 r_aliases = buffer + idx; in _nss_mymachines_gethostbyname3_r() 328 idx += sizeof(char*); in _nss_mymachines_gethostbyname3_r() [all …]
|
/systemd-251/src/nss-resolve/ |
D | nss-resolve.c | 302 size_t idx, ms = ALIGN(l+1) + ALIGN(sizeof(struct gaih_addrtuple)) * n_addresses; in _nss_resolve_gethostbyname4_r() local 314 idx = ALIGN(l + 1); in _nss_resolve_gethostbyname4_r() 318 *r_tuple_first = (struct gaih_addrtuple*) (buffer + idx); in _nss_resolve_gethostbyname4_r() 330 r_tuple = (struct gaih_addrtuple*) (buffer + idx); in _nss_resolve_gethostbyname4_r() 337 idx += ALIGN(sizeof(struct gaih_addrtuple)); in _nss_resolve_gethostbyname4_r() 343 assert(idx == ms); in _nss_resolve_gethostbyname4_r() 461 … size_t idx, ms = ALIGN(l + 1) + n_addresses * ALIGN(alen) + (n_addresses + 2) * sizeof(char*); in _nss_resolve_gethostbyname3_r() local 473 idx = ALIGN(l+1); in _nss_resolve_gethostbyname3_r() 476 char *r_aliases = buffer + idx; in _nss_resolve_gethostbyname3_r() 478 idx += sizeof(char*); in _nss_resolve_gethostbyname3_r() [all …]
|
/systemd-251/src/rfkill/ |
D | rfkill.c | 78 if (asprintf(&sysname, "rfkill%i", event->idx) < 0) in find_device() 170 .idx = event->idx, in load_state() 179 … return log_error_errno(errno, "Failed to restore rfkill state for %i: %m", event->idx); in load_state() 190 static void save_state_queue_remove(Context *c, int idx, const char *state_file) { in save_state_queue_remove() argument 194 if ((state_file && streq(item->file, state_file)) || idx == item->rfkill_idx) { in save_state_queue_remove() 214 save_state_queue_remove(c, event->idx, state_file); in save_state_queue() 221 item->rfkill_idx = event->idx; in save_state_queue() 238 save_state_queue_remove(c, event->idx, state_file); in save_state_cancel() 357 … log_debug("A new rfkill device has been added with index %i and type %s.", event.idx, type); in run() 362 … log_debug("An rfkill device has been removed with index %i and type %s", event.idx, type); in run() [all …]
|
/systemd-251/src/libsystemd/sd-journal/ |
D | fsprg.c | 99 static void det_randomize(void *buf, size_t buflen, const void *seed, size_t seedlen, uint32_t idx)… in det_randomize() argument 109 gcry_md_putc(hd, (idx >> 24) & 0xff); in det_randomize() 110 gcry_md_putc(hd, (idx >> 16) & 0xff); in det_randomize() 111 gcry_md_putc(hd, (idx >> 8) & 0xff); in det_randomize() 112 gcry_md_putc(hd, (idx >> 0) & 0xff); in det_randomize() 132 static gcry_mpi_t genprime3mod4(int bits, const void *seed, size_t seedlen, uint32_t idx) { in genprime3mod4() argument 140 det_randomize(buf, buflen, seed, seedlen, idx); in genprime3mod4() 152 static gcry_mpi_t gensquare(const gcry_mpi_t n, const void *seed, size_t seedlen, uint32_t idx, uns… in gensquare() argument 157 det_randomize(buf, buflen, seed, seedlen, idx); in gensquare() 374 void FSPRG_GetKey(const void *state, void *key, size_t keylen, uint32_t idx) { in FSPRG_GetKey() argument [all …]
|
D | fsprg.h | 58 void FSPRG_GetKey(const void *state, void *key, size_t keylen, uint32_t idx);
|
/systemd-251/src/shared/ |
D | exec-util.c | 429 size_t idx; in exec_command_flags_to_string() local 431 for (idx = 0; idx < ELEMENTSOF(exec_command_strings); idx++) in exec_command_flags_to_string() 432 if (i == (1 << idx)) in exec_command_flags_to_string() 433 return exec_command_strings[idx]; in exec_command_flags_to_string() 439 ssize_t idx; in exec_command_flags_from_string() local 441 idx = string_table_lookup(exec_command_strings, ELEMENTSOF(exec_command_strings), s); in exec_command_flags_from_string() 443 if (idx < 0) in exec_command_flags_from_string() 446 return 1 << idx; in exec_command_flags_from_string()
|
D | bitmap.c | 159 if (!b || i->idx == BITMAP_END) in bitmap_iterate() 162 offset = BITMAP_NUM_TO_OFFSET(i->idx); in bitmap_iterate() 163 rem = BITMAP_NUM_TO_REM(i->idx); in bitmap_iterate() 171 i->idx = *n + 1; in bitmap_iterate() 182 i->idx = BITMAP_END; in bitmap_iterate()
|
D | json.h | 158 size_t idx; member 164 state.idx < json_variant_elements(state.variant) && \ 165 ({ i = json_variant_by_index(state.variant, state.idx); \ 167 state.idx++) 174 state.idx < json_variant_elements(state.variant) && \ 175 ({ k = json_variant_string(json_variant_by_index(state.variant, state.idx)); \ 176 e = json_variant_by_index(state.variant, state.idx + 1); \ 178 state.idx += 2)
|
D | cryptsetup-util.c | 180 int idx, in cryptsetup_get_token_as_json() argument 202 r = sym_crypt_token_json_get(cd, idx, &text); in cryptsetup_get_token_as_json()
|
/systemd-251/src/nspawn/ |
D | nspawn-network.c | 65 uint64_t idx) { in generate_mac() argument 74 if (idx > 0) in generate_mac() 75 sz += sizeof(idx); in generate_mac() 87 if (idx > 0) { in generate_mac() 88 idx = htole64(idx); in generate_mac() 89 memcpy(i, &idx, sizeof(idx)); in generate_mac() 290 uint64_t idx = 0; in setup_veth_extra() local 306 r = generate_mac(machine_name, &mac_container, VETH_EXTRA_CONTAINER_HASH_KEY, idx); in setup_veth_extra() 310 r = generate_mac(machine_name, &mac_host, VETH_EXTRA_HOST_HASH_KEY, idx); in setup_veth_extra() 318 idx++; in setup_veth_extra() [all …]
|
/systemd-251/src/test/ |
D | test-hashmap.c | 52 unsigned num, idx; in compare_cache() local 59 idx = 0; in compare_cache() 61 assert_se(v == values[idx]); in compare_cache() 62 assert_se(k == keys[idx]); in compare_cache() 64 idx++; in compare_cache() 67 assert_se(idx == num); in compare_cache()
|
D | test-prioq.c | 49 unsigned idx; member 82 assert_se(prioq_put(q, t, &t->idx) >= 0); in TEST() 100 assert_se(prioq_remove(q, t, &t->idx) == 1); in TEST() 101 assert_se(prioq_remove(q, t, &t->idx) == 0); in TEST() 111 assert_se(prioq_remove(q, t, &t->idx) == 0); in TEST()
|
/systemd-251/src/home/ |
D | user-record-util.c | 630 size_t idx = SIZE_MAX, n; in user_record_set_disk_size() local 676 idx = SIZE_MAX; in user_record_set_disk_size() 683 idx = i; in user_record_set_disk_size() 693 idx = SIZE_MAX; in user_record_set_disk_size() 696 if (idx == SIZE_MAX) in user_record_set_disk_size() 697 idx = n++; /* Nothing suitable found, place new entry at end */ in user_record_set_disk_size() 699 ne = json_variant_ref(array[idx]); in user_record_set_disk_size() 706 idx = 0; in user_record_set_disk_size() 720 assert(idx < n); in user_record_set_disk_size() 721 array[idx] = ne; in user_record_set_disk_size() [all …]
|
/systemd-251/src/vconsole/ |
D | vconsole-setup.c | 47 static int verify_vc_allocation(unsigned idx) { in verify_vc_allocation() argument 50 xsprintf(vcname, "/dev/vcs%u", idx); in verify_vc_allocation() 422 unsigned idx = 0; in main() local 432 fd = find_source_vc(&vc, &idx); in main() 468 if (idx > 0) { in main() 470 setup_remaining_vcs(fd, idx, utf8); in main()
|
/systemd-251/src/libsystemd-network/ |
D | test-ndisc-rs.c | 228 static unsigned idx = 0; in test_callback() local 246 assert_se(flags == flags_array[idx]); in test_callback() 247 idx++; in test_callback() 252 if (idx < ELEMENTSOF(flags_array)) { in test_callback() 253 send_ra(flags_array[idx]); in test_callback()
|
/systemd-251/src/udev/ |
D | udev-builtin-net_id.c | 156 static bool is_valid_onboard_index(unsigned long idx) { in is_valid_onboard_index() argument 163 …return idx <= (naming_scheme_has(NAMING_16BIT_INDEX) ? ONBOARD_16BIT_INDEX_MAX : ONBOARD_14BIT_IND… in is_valid_onboard_index() 168 unsigned long idx, dev_port = 0; in dev_pci_onboard() local 189 r = safe_atolu(attr, &idx); in dev_pci_onboard() 193 if (idx == 0 && !naming_scheme_has(NAMING_ZERO_ACPI_INDEX)) in dev_pci_onboard() 196 if (!is_valid_onboard_index(idx)) in dev_pci_onboard() 198 "Not a valid onboard index: %lu", idx); in dev_pci_onboard() 210 l = strpcpyf(&s, l, "o%lu", idx); in dev_pci_onboard() 219 idx, strempty(info->phys_port_name), dev_port, in dev_pci_onboard()
|
/systemd-251/src/libsystemd/sd-bus/ |
D | bus-socket.c | 34 static void iovec_advance(struct iovec iov[], unsigned *idx, size_t size) { in iovec_advance() argument 37 struct iovec *i = iov + *idx; in iovec_advance() 49 (*idx)++; in iovec_advance() 1023 int bus_socket_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx) { in bus_socket_write_message() argument 1032 assert(idx); in bus_socket_write_message() 1035 if (*idx >= BUS_MESSAGE_SIZE(m)) in bus_socket_write_message() 1047 iovec_advance(iov, &j, *idx); in bus_socket_write_message() 1057 if (m->n_fds > 0 && *idx == 0) { in bus_socket_write_message() 1079 *idx += (size_t) k; in bus_socket_write_message()
|
D | bus-socket.h | 13 int bus_socket_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx);
|
/systemd-251/src/libsystemd/sd-hwdb/ |
D | sd-hwdb.c | 67 …ct trie_child_entry_f *trie_node_child(sd_hwdb *hwdb, const struct trie_node_f *node, size_t idx) { in trie_node_child() argument 71 base += idx * le64toh(hwdb->head->child_entry_size); in trie_node_child() 75 …ct trie_value_entry_f *trie_node_value(sd_hwdb *hwdb, const struct trie_node_f *node, size_t idx) { in trie_node_value() argument 80 base += idx * le64toh(hwdb->head->value_entry_size); in trie_node_value()
|