/systemd-251/src/shared/ |
D | bus-wait-for-units.c | 44 static WaitForItem *wait_for_item_free(WaitForItem *item) { in wait_for_item_free() argument 47 if (!item) in wait_for_item_free() 50 if (item->parent) { in wait_for_item_free() 51 … if (FLAGS_SET(item->flags, BUS_WAIT_REFFED) && item->bus_path && item->parent->bus) { in wait_for_item_free() 53 item->parent->bus, in wait_for_item_free() 56 item->bus_path, in wait_for_item_free() 63 … log_debug_errno(r, "Failed to drop reference to unit %s, ignoring: %m", item->bus_path); in wait_for_item_free() 66 assert_se(hashmap_remove(item->parent->items, item->bus_path) == item); in wait_for_item_free() 68 if (item->parent->current == item) in wait_for_item_free() 69 item->parent->current = NULL; in wait_for_item_free() [all …]
|
/systemd-251/src/test/ |
D | test-list.c | 9 LIST_FIELDS(struct list_item, item); in main() 21 LIST_INIT(item, &items[i]); in main() 22 assert_se(LIST_JUST_US(item, &items[i])); in main() 23 LIST_PREPEND(item, head, &items[i]); in main() 27 LIST_FOREACH_OTHERS(item, cursor, &items[2]) { in main() 34 LIST_FOREACH_OTHERS(item, cursor, &items[0]) { in main() 41 LIST_FOREACH_OTHERS(item, cursor, &items[3]) { in main() 47 assert_se(!LIST_JUST_US(item, head)); in main() 60 LIST_FIND_HEAD(item, &items[0], cursor); in main() 63 LIST_FIND_TAIL(item, &items[3], cursor); in main() [all …]
|
D | test-sd-path.c | 43 STRV_FOREACH(item, t) in TEST() 44 log_debug(" %s", *item); in TEST() 49 STRV_FOREACH(item, s) { in TEST() 50 assert_se(endswith(*item, "/suffix")); in TEST() 51 log_debug(" %s", *item); in TEST()
|
D | test-ordered-set.c | 37 static void item_seen(Item *item) { in item_seen() argument 38 item->seen++; in item_seen()
|
/systemd-251/src/resolve/ |
D | resolved-dns-answer.c | 12 static DnsAnswerItem *dns_answer_item_free(DnsAnswerItem *item) { in dns_answer_item_free() argument 13 if (!item) in dns_answer_item_free() 16 dns_resource_record_unref(item->rr); in dns_answer_item_free() 17 dns_resource_record_unref(item->rrsig); in dns_answer_item_free() 19 return mfree(item); in dns_answer_item_free() 112 _cleanup_(dns_answer_item_unrefp) DnsAnswerItem *item = NULL; in dns_answer_add_raw() 123 item = new(DnsAnswerItem, 1); in dns_answer_add_raw() 124 if (!item) in dns_answer_add_raw() 127 *item = (DnsAnswerItem) { in dns_answer_add_raw() 135 r = ordered_set_put(a->items, item); in dns_answer_add_raw() [all …]
|
D | resolved-etc-hosts.c | 21 static void etc_hosts_item_free(EtcHostsItem *item) { in etc_hosts_item_free() argument 22 strv_free(item->names); in etc_hosts_item_free() 23 free(item); in etc_hosts_item_free() 26 static void etc_hosts_item_by_name_free(EtcHostsItemByName *item) { in etc_hosts_item_by_name_free() argument 27 free(item->name); in etc_hosts_item_by_name_free() 28 free(item->addresses); in etc_hosts_item_by_name_free() 29 free(item); in etc_hosts_item_by_name_free() 47 EtcHostsItem *item; in parse_line() local 72 item = NULL; in parse_line() 76 item = hashmap_get(hosts->by_address, &address); in parse_line() [all …]
|
D | resolved-dns-answer.h | 104 DnsAnswerItem *item; member 110 ordered_set_iterate(i.answer->items, &i.iterator, (void**) &(i.item)) && \ 111 (kk = i.item->rr, true); ) 118 ordered_set_iterate(i.answer->items, &i.iterator, (void**) &(i.item)) && \ 119 (kk = i.item->rr, ifi = i.item->ifindex, true); ) 126 ordered_set_iterate(i.answer->items, &i.iterator, (void**) &(i.item)) && \ 127 (kk = i.item->rr, fl = i.item->flags, true); ) 131 #define _DNS_ANSWER_FOREACH_ITEM(item, a, i) \ argument 134 ordered_set_iterate(i.answer->items, &i.iterator, (void**) &(i.item)) && \ 135 (item = i.item, true); ) [all …]
|
D | resolved-dns-question.c | 54 DnsQuestionItem *item; in dns_question_add() local 63 DNS_QUESTION_FOREACH_ITEM(item, q) { in dns_question_add() 64 r = dns_resource_key_equal(item->key, key); in dns_question_add() 67 if (r > 0 && item->flags == flags) in dns_question_add() 172 DnsQuestionItem *item; in dns_question_contains_item() local 177 DNS_QUESTION_FOREACH_ITEM(item, q) { in dns_question_contains_item() 178 if (item->flags != i->flags) in dns_question_contains_item() 180 r = dns_resource_key_equal(item->key, i->key); in dns_question_contains_item() 189 DnsQuestionItem *item; in dns_question_is_equal() local 202 DNS_QUESTION_FOREACH_ITEM(item, a) { in dns_question_is_equal() [all …]
|
D | resolved-dns-cache.c | 63 #define DNS_CACHE_ITEM_IS_PRIMARY(item) (!!(item)->answer) argument 65 static const char *dns_cache_item_type_to_string(DnsCacheItem *item) { in dns_cache_item_type_to_string() argument 66 assert(item); in dns_cache_item_type_to_string() 68 switch (item->type) { in dns_cache_item_type_to_string() 80 return dns_rcode_to_string(item->rcode); in dns_cache_item_type_to_string() 687 DnsAnswerItem *item; in dns_cache_put() local 734 DNS_ANSWER_FOREACH_ITEM(item, answer) { in dns_cache_put() 737 if (!FLAGS_SET(item->flags, DNS_ANSWER_CACHEABLE) || in dns_cache_put() 738 !rr_eligible(item->rr)) in dns_cache_put() 746 primary = dns_resource_key_match_rr(key, item->rr, NULL); in dns_cache_put() [all …]
|
D | resolved-dns-question.h | 74 #define _DNS_QUESTION_FOREACH_ITEM(u, item, q) \ argument 76 (item) = dns_question_isempty(q) ? NULL : (q)->items; \ 80 … UNIQ_T(i, u)++, (item) = (UNIQ_T(i, u) < dns_question_size(q) ? (q)->items + UNIQ_T(i, u) : NULL)) 82 #define DNS_QUESTION_FOREACH_ITEM(item, q) _DNS_QUESTION_FOREACH_ITEM(UNIQ, item, q) argument
|
D | resolved-dns-stub.c | 165 DnsAnswerItem *item; in dns_stub_collect_answer_by_question() local 172 DNS_ANSWER_FOREACH_ITEM(item, answer) { in dns_stub_collect_answer_by_question() 175 r = dns_question_matches_rr(question, item->rr, NULL); in dns_stub_collect_answer_by_question() 180 r = dns_question_matches_cname_or_dname(question, item->rr, NULL); in dns_stub_collect_answer_by_question() 192 item->rr, in dns_stub_collect_answer_by_question() 193 item->ifindex, in dns_stub_collect_answer_by_question() 194 item->flags & ~DNS_ANSWER_MASK_SECTIONS, in dns_stub_collect_answer_by_question() 195 item->rrsig, in dns_stub_collect_answer_by_question() 212 DnsAnswerItem *item; in dns_stub_collect_answer_by_section() local 220 DNS_ANSWER_FOREACH_ITEM(item, answer) { in dns_stub_collect_answer_by_section() [all …]
|
D | resolved-mdns.c | 189 DnsQuestionItem *item; in mdns_should_reply_using_unicast() local 210 DNS_QUESTION_FOREACH_ITEM(item, p->question) { in mdns_should_reply_using_unicast() 211 if (!FLAGS_SET(item->flags, DNS_QUESTION_WANTS_UNICAST_REPLY)) in mdns_should_reply_using_unicast() 272 DnsAnswerItem *item; in mdns_scope_process_query() local 317 DNS_ANSWER_FOREACH_ITEM(item, answer) { in mdns_scope_process_query() 318 DnsAnswerFlags flags = item->flags; in mdns_scope_process_query() 323 … r = dns_answer_add(full_answer, item->rr, item->ifindex, flags, item->rrsig); in mdns_scope_process_query()
|
/systemd-251/src/rfkill/ |
D | rfkill.c | 45 static struct write_queue_item* write_queue_item_free(struct write_queue_item *item) { in write_queue_item_free() argument 46 if (!item) in write_queue_item_free() 49 free(item->file); in write_queue_item_free() 50 return mfree(item); in write_queue_item_free() 193 LIST_FOREACH(queue, item, c->write_queue) in save_state_queue_remove() 194 if ((state_file && streq(item->file, state_file)) || idx == item->rfkill_idx) { in save_state_queue_remove() 195 … log_debug("Canceled previous save state of '%s' to %s.", one_zero(item->state), item->file); in save_state_queue_remove() 196 LIST_REMOVE(queue, c->write_queue, item); in save_state_queue_remove() 197 write_queue_item_free(item); in save_state_queue_remove() 203 struct write_queue_item *item; in save_state_queue() local [all …]
|
/systemd-251/src/sysupdate/ |
D | sysupdate-cache.c | 28 _cleanup_(web_cache_item_freep) WebCacheItem *item = NULL; in web_cache_add_item() 39 item = web_cache_get_item(*web_cache, url, verified); in web_cache_add_item() 40 if (item && memcmp_nn(item->data, item->size, data, size) == 0) in web_cache_add_item() 54 item = malloc(offsetof(WebCacheItem, data) + size + 1); in web_cache_add_item() 55 if (!item) in web_cache_add_item() 58 *item = (WebCacheItem) { in web_cache_add_item() 65 *(uint8_t*) mempcpy(item->data, data, size) = 0; in web_cache_add_item() 69 r = hashmap_put(*web_cache, item->url, item); in web_cache_add_item() 73 TAKE_PTR(item); in web_cache_add_item()
|
/systemd-251/src/basic/ |
D | list.h | 22 #define LIST_INIT(name,item) \ argument 24 typeof(*(item)) *_item = (item); \ 30 #define LIST_PREPEND(name,head,item) \ argument 32 typeof(*(head)) **_head = &(head), *_item = (item); \ 41 #define LIST_APPEND(name,head,item) \ argument 45 LIST_INSERT_AFTER(name, *_hhead, _tail, item); \ 49 #define LIST_REMOVE(name,head,item) \ argument 51 typeof(*(head)) **_head = &(head), *_item = (item); \ 65 #define LIST_FIND_HEAD(name,item,head) \ argument 67 typeof(*(item)) *_item = (item); \ [all …]
|
D | meson.build | 299 foreach item : [['af', af_list_txt, 'af', ''], 304 fname = '@0@-from-name.gperf'.format(item[0]) 307 input : item[1], 309 command : [generate_gperfs, item[2], item[3], '@INPUT@'], 312 fname = '@0@-from-name.h'.format(item[0]) 319 '-N', 'lookup_@0@'.format(item[2]), 320 '-H', 'hash_@0@_name'.format(item[2]), 325 fname = '@0@-to-name.h'.format(item[0]) 326 awkscript = '@0@-to-name.awk'.format(item[0]) 329 input : [awkscript, item[1]],
|
/systemd-251/coccinelle/ |
D | macros.h | 67 #define LIST_INIT(name,item) \ argument 69 typeof(*(item)) *_item = (item); \ 73 #define LIST_PREPEND(name,head,item) \ argument 75 typeof(*(head)) **_head = &(head), *_item = (item); \ 82 #define LIST_APPEND(name,head,item) \ argument 86 LIST_INSERT_AFTER(name, *_hhead, _tail, item); \ 88 #define LIST_REMOVE(name,head,item) \ argument 90 typeof(*(head)) **_head = &(head), *_item = (item); \ 102 #define LIST_FIND_HEAD(name,item,head) \ argument 104 typeof(*(item)) *_item = (item); \ [all …]
|
/systemd-251/tools/ |
D | update-dbus-docs.py | 152 for item in items: 158 item_repr = item 161 item_repr = item 163 assert False, (klass, item) 168 missing.append((klass, item)) 274 for item in reversed(missing): 319 for item in (etree, shlex_quote): 320 if isinstance(item, Exception): 321 print(item, file=sys.stderr) 331 total = sum((item['stats'] for item in stats.values()), collections.Counter())
|
/systemd-251/src/core/ |
D | bpf-socket-bind.c | 34 LIST_FOREACH(socket_bind_items, item, head) { in update_rules_map() 36 .address_family = (uint32_t) item->address_family, in update_rules_map() 37 .protocol = item->ip_protocol, in update_rules_map() 38 .nr_ports = item->nr_ports, in update_rules_map() 39 .port_min = item->port_min, in update_rules_map() 63 LIST_FOREACH(socket_bind_items, item, allow) in prepare_socket_bind_bpf() 66 LIST_FOREACH(socket_bind_items, item, deny) in prepare_socket_bind_bpf()
|
D | namespace.c | 2520 int bind_mount_add(BindMount **b, size_t *n, const BindMount *item) { in bind_mount_add() argument 2526 assert(item); in bind_mount_add() 2528 s = strdup(item->source); in bind_mount_add() 2532 d = strdup(item->destination); in bind_mount_add() 2545 .read_only = item->read_only, in bind_mount_add() 2546 .nosuid = item->nosuid, in bind_mount_add() 2547 .recursive = item->recursive, in bind_mount_add() 2548 .ignore_enoent = item->ignore_enoent, in bind_mount_add() 2569 int mount_image_add(MountImage **m, size_t *n, const MountImage *item) { in mount_image_add() argument 2576 assert(item); in mount_image_add() [all …]
|
/systemd-251/shell-completion/zsh/ |
D | meson.build | 43 foreach item : items 44 if zshcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1) 45 install_data(item[0],
|
/systemd-251/shell-completion/bash/ |
D | meson.build | 49 foreach item : items 50 if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1) 51 install_data(item[0],
|
/systemd-251/src/tmpfiles/ |
D | tmpfiles.c | 389 Item *item = j->items + n; in find_glob() local 391 if (fnmatch(item->path, match, FNM_PATHNAME|FNM_PERIOD) == 0) in find_glob() 392 return item; in find_glob() 1048 static int parse_acls_from_arg(Item *item) { in parse_acls_from_arg() argument 1052 assert(item); in parse_acls_from_arg() 1057 … r = parse_acl(item->argument, &item->acl_access, &item->acl_default, !item->append_or_force); in parse_acls_from_arg() 1059 log_warning_errno(r, "Failed to parse ACL \"%s\": %m. Ignoring", item->argument); in parse_acls_from_arg() 1117 static int fd_set_acls(Item *item, int fd, const char *path, const struct stat *st) { in fd_set_acls() argument 1122 assert(item); in fd_set_acls() 1142 if (item->acl_access) in fd_set_acls() [all …]
|
/systemd-251/src/portable/ |
D | portable.c | 129 PortableMetadata *item; in portable_metadata_hashmap_to_sorted_array() local 136 HASHMAP_FOREACH(item, unit_files) in portable_metadata_hashmap_to_sorted_array() 137 sorted[k++] = item; in portable_metadata_hashmap_to_sorted_array() 1290 PortableMetadata *item; in portable_attach() local 1352 HASHMAP_FOREACH(item, unit_files) { in portable_attach() 1353 r = unit_file_exists(LOOKUP_SCOPE_SYSTEM, &paths, item->name); in portable_attach() 1355 …r_set_errnof(error, r, "Failed to determine whether unit '%s' exists on the host: %m", item->name); in portable_attach() 1357 …(error, BUS_ERROR_UNIT_EXISTS, "Unit file '%s' exists on the host already, refusing.", item->name); in portable_attach() 1359 r = unit_file_is_active(bus, item->name, error); in portable_attach() 1363 …rror_setf(error, BUS_ERROR_UNIT_EXISTS, "Unit file '%s' is active already, refusing.", item->name); in portable_attach() [all …]
|
/systemd-251/src/oom/ |
D | oomd-util.c | 147 OomdCGroupContext *item; in oomd_sort_cgroup_contexts() local 158 HASHMAP_FOREACH(item, h) { in oomd_sort_cgroup_contexts() 160 …if ((item->path && prefix && !path_startswith(item->path, prefix)) || item->preference == MANAGED_… in oomd_sort_cgroup_contexts() 163 sorted[k++] = item; in oomd_sort_cgroup_contexts()
|