/systemd-251/src/resolve/ |
D | resolved-dns-query.c | 21 static int dns_query_candidate_new(DnsQueryCandidate **ret, DnsQuery *q, DnsScope *s) { in dns_query_candidate_new() argument 25 assert(q); in dns_query_candidate_new() 34 .query = q, in dns_query_candidate_new() 38 LIST_PREPEND(candidates_by_query, q->candidates, c); in dns_query_candidate_new() 347 static void dns_query_stop(DnsQuery *q) { in dns_query_stop() argument 348 assert(q); in dns_query_stop() 350 event_source_disable(q->timeout_event_source); in dns_query_stop() 352 LIST_FOREACH(candidates_by_query, c, q->candidates) in dns_query_stop() 356 static void dns_query_unlink_candidates(DnsQuery *q) { in dns_query_unlink_candidates() argument 357 assert(q); in dns_query_unlink_candidates() [all …]
|
D | resolved-dns-question.c | 9 DnsQuestion *q; in dns_question_new() local 14 q = malloc0(offsetof(DnsQuestion, items) + sizeof(DnsQuestionItem) * n); in dns_question_new() 15 if (!q) in dns_question_new() 18 q->n_ref = 1; in dns_question_new() 19 q->n_allocated = n; in dns_question_new() 21 return q; in dns_question_new() 24 static DnsQuestion *dns_question_free(DnsQuestion *q) { in dns_question_free() argument 27 assert(q); in dns_question_free() 29 DNS_QUESTION_FOREACH(key, q) in dns_question_free() 32 return mfree(q); in dns_question_free() [all …]
|
D | resolved-dns-question.h | 28 DnsQuestion *dns_question_ref(DnsQuestion *q); 29 DnsQuestion *dns_question_unref(DnsQuestion *q); 35 int dns_question_add_raw(DnsQuestion *q, DnsResourceKey *key, DnsQuestionFlags flags); 36 int dns_question_add(DnsQuestion *q, DnsResourceKey *key, DnsQuestionFlags flags); 38 int dns_question_matches_rr(DnsQuestion *q, DnsResourceRecord *rr, const char *search_domain); 39 int dns_question_matches_cname_or_dname(DnsQuestion *q, DnsResourceRecord *rr, const char* search_d… 40 int dns_question_is_valid_for_query(DnsQuestion *q); 41 int dns_question_contains_key(DnsQuestion *q, const DnsResourceKey *k); 44 int dns_question_cname_redirect(DnsQuestion *q, const DnsResourceRecord *cname, DnsQuestion **ret); 46 void dns_question_dump(DnsQuestion *q, FILE *f); [all …]
|
D | resolved-varlink.c | 22 static int reply_query_state(DnsQuery *q) { in reply_query_state() argument 24 assert(q); in reply_query_state() 25 assert(q->varlink_request); in reply_query_state() 27 switch (q->state) { in reply_query_state() 30 return varlink_error(q->varlink_request, "io.systemd.Resolve.NoNameServers", NULL); in reply_query_state() 33 return varlink_error(q->varlink_request, "io.systemd.Resolve.QueryTimedOut", NULL); in reply_query_state() 36 … return varlink_error(q->varlink_request, "io.systemd.Resolve.MaxAttemptsReached", NULL); in reply_query_state() 39 return varlink_error(q->varlink_request, "io.systemd.Resolve.InvalidReply", NULL); in reply_query_state() 42 return varlink_error_errno(q->varlink_request, q->answer_errno); in reply_query_state() 45 return varlink_error(q->varlink_request, "io.systemd.Resolve.QueryAborted", NULL); in reply_query_state() [all …]
|
D | resolved-bus.c | 30 DnsQuery *q = userdata; in query_on_bus_track() local 33 assert(q); in query_on_bus_track() 35 if (!DNS_TRANSACTION_IS_LIVE(q->state)) in query_on_bus_track() 39 dns_query_complete(q, DNS_TRANSACTION_ABORTED); in query_on_bus_track() 43 static int dns_query_bus_track(DnsQuery *q, sd_bus_message *m) { in dns_query_bus_track() argument 46 assert(q); in dns_query_bus_track() 49 if (!q->bus_track) { in dns_query_bus_track() 50 … r = sd_bus_track_new(sd_bus_message_get_bus(m), &q->bus_track, query_on_bus_track, q); in dns_query_bus_track() 55 r = sd_bus_track_add_sender(q->bus_track, m); in dns_query_bus_track() 62 static sd_bus_message *dns_query_steal_request(DnsQuery *q) { in dns_query_steal_request() argument [all …]
|
D | resolved-dns-stub.c | 248 DnsQuery *q, in dns_stub_assign_sections() argument 254 assert(q); in dns_stub_assign_sections() 271 &q->reply_answer, in dns_stub_assign_sections() 272 q->answer, in dns_stub_assign_sections() 281 &q->reply_authoritative, in dns_stub_assign_sections() 282 q->answer, in dns_stub_assign_sections() 284 q->reply_answer, NULL, in dns_stub_assign_sections() 292 &q->reply_additional, in dns_stub_assign_sections() 293 q->answer, in dns_stub_assign_sections() 295 q->reply_answer, q->reply_authoritative, in dns_stub_assign_sections() [all …]
|
D | resolved-dns-query.h | 108 void (*complete)(DnsQuery* q); 130 int dns_query_new(Manager *m, DnsQuery **q, DnsQuestion *question_utf8, DnsQuestion *question_idna,… 131 DnsQuery *dns_query_free(DnsQuery *q); 133 int dns_query_make_auxiliary(DnsQuery *q, DnsQuery *auxiliary_for); 135 int dns_query_go(DnsQuery *q); 136 void dns_query_ready(DnsQuery *q); 138 int dns_query_process_cname_one(DnsQuery *q); 139 int dns_query_process_cname_many(DnsQuery *q); 141 void dns_query_complete(DnsQuery *q, DnsTransactionState state); 143 DnsQuestion* dns_query_question_for_protocol(DnsQuery *q, DnsProtocol protocol); [all …]
|
/systemd-251/src/basic/ |
D | prioq.c | 33 Prioq *q; in prioq_new() local 35 q = new(Prioq, 1); in prioq_new() 36 if (!q) in prioq_new() 37 return q; in prioq_new() 39 *q = (Prioq) { in prioq_new() 43 return q; in prioq_new() 46 Prioq* prioq_free(Prioq *q) { in prioq_free() argument 47 if (!q) in prioq_free() 50 free(q->items); in prioq_free() 51 return mfree(q); in prioq_free() [all …]
|
D | prioq.h | 14 Prioq *prioq_free(Prioq *q); 16 int prioq_ensure_allocated(Prioq **q, compare_func_t compare_func); 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_; 24 static inline void *prioq_peek(Prioq *q) { in prioq_peek() argument 25 return prioq_peek_by_index(q, 0); in prioq_peek() 27 void *prioq_pop(Prioq *q); [all …]
|
D | capability-util.c | 400 bool capability_quintet_mangle(CapabilityQuintet *q) { in capability_quintet_mangle() argument 404 assert(q); in capability_quintet_mangle() 406 combined = q->effective | q->bounding | q->inheritable | q->permitted; in capability_quintet_mangle() 408 ambient_supported = q->ambient != UINT64_MAX; in capability_quintet_mangle() 410 combined |= q->ambient; in capability_quintet_mangle() 425 q->effective &= ~drop; in capability_quintet_mangle() 426 q->bounding &= ~drop; in capability_quintet_mangle() 427 q->inheritable &= ~drop; in capability_quintet_mangle() 428 q->permitted &= ~drop; in capability_quintet_mangle() 431 q->ambient &= ~drop; in capability_quintet_mangle() [all …]
|
D | path-util.c | 393 const char *p, *q; in path_startswith_full() local 400 k = path_find_first_component(&prefix, accept_dot_dot, &q); in path_startswith_full() 410 if (!strneq(p, q, r)) in path_startswith_full() 495 char *q, *nx; in path_extend_internal() local 549 q = nx + old_sz; in path_extend_internal() 557 *(q++) = '/'; in path_extend_internal() 559 q = stpcpy(q, p); in path_extend_internal() 810 const char *q, *first, *end_first, *next; in path_find_first_component() local 848 q = *p; in path_find_first_component() 850 first = skip_slash_or_dot(q); in path_find_first_component() [all …]
|
/systemd-251/src/libsystemd/sd-bus/ |
D | bus-internal.c | 11 const char *q; in object_path_is_valid() local 23 for (slash = true, q = p+1; *q; q++) in object_path_is_valid() 24 if (*q == '/') { in object_path_is_valid() 33 (*q >= 'a' && *q <= 'z') || in object_path_is_valid() 34 (*q >= 'A' && *q <= 'Z') || in object_path_is_valid() 35 (*q >= '0' && *q <= '9') || in object_path_is_valid() 36 *q == '_'; in object_path_is_valid() 47 return (q - p) <= BUS_PATH_SIZE_MAX; in object_path_is_valid() 74 const char *q; in interface_name_is_valid() local 80 for (dot = true, q = p; *q; q++) in interface_name_is_valid() [all …]
|
/systemd-251/src/libsystemd/sd-resolve/ |
D | sd-resolve.c | 161 static int getaddrinfo_done(sd_resolve_query* q); 162 static int getnameinfo_done(sd_resolve_query *q); 164 static void resolve_query_disconnect(sd_resolve_query *q); 169 static void query_assign_errno(sd_resolve_query *q, int ret, int error, int h_error) { in query_assign_errno() argument 170 assert(q); in query_assign_errno() 172 q->ret = ret; in query_assign_errno() 173 q->_errno = abs(error); in query_assign_errno() 174 q->_h_errno = h_error; in query_assign_errno() 562 sd_resolve_query *q; in resolve_free() local 567 while ((q = resolve->queries)) { in resolve_free() [all …]
|
/systemd-251/src/shared/ |
D | bus-polkit.c | 168 static void async_polkit_query_free(AsyncPolkitQuery *q) { in async_polkit_query_free() argument 169 if (!q) in async_polkit_query_free() 172 sd_bus_slot_unref(q->slot); in async_polkit_query_free() 174 if (q->registry && q->request) in async_polkit_query_free() 175 hashmap_remove(q->registry, q->request); in async_polkit_query_free() 177 sd_bus_message_unref(q->request); in async_polkit_query_free() 178 sd_bus_message_unref(q->reply); in async_polkit_query_free() 180 free(q->action); in async_polkit_query_free() 181 strv_free(q->details); in async_polkit_query_free() 183 sd_event_source_disable_unref(q->defer_event_source); in async_polkit_query_free() [all …]
|
D | dns-domain.c | 208 char *q; in dns_label_escape() local 222 q = dest; in dns_label_escape() 232 *(q++) = '\\'; in dns_label_escape() 233 *(q++) = *p; in dns_label_escape() 247 *(q++) = *p; in dns_label_escape() 257 *(q++) = '\\'; in dns_label_escape() 258 *(q++) = '0' + (char) ((uint8_t) *p / 100); in dns_label_escape() 259 *(q++) = '0' + (char) (((uint8_t) *p / 10) % 10); in dns_label_escape() 260 *(q++) = '0' + (char) ((uint8_t) *p % 10); in dns_label_escape() 269 *q = 0; in dns_label_escape() [all …]
|
/systemd-251/src/test/ |
D | test-prioq.c | 19 _cleanup_(prioq_freep) Prioq *q = NULL; in TEST() 24 assert_se(q = prioq_new(trivial_compare_func)); in TEST() 29 assert_se(prioq_put(q, UINT_TO_PTR(u), NULL) >= 0); in TEST() 31 n = prioq_size(q); in TEST() 32 assert_se(prioq_remove(q, UINT_TO_PTR(u), &n) == 0); in TEST() 38 assert_se(prioq_size(q) == ELEMENTSOF(buffer) - i); in TEST() 40 u = PTR_TO_UINT(prioq_pop(q)); in TEST() 44 assert_se(prioq_isempty(q)); in TEST() 63 _cleanup_(prioq_freep) Prioq *q = NULL; in TEST() 70 assert_se(q = prioq_new((compare_func_t) test_compare)); in TEST() [all …]
|
D | test-json.c | 145 JsonVariant *p, *q; in test_1() local 166 q = json_variant_by_index(p, i); in test_1() 167 …assert_se(q && json_variant_type(q) == JSON_VARIANT_UNSIGNED && json_variant_unsigned(q) == (i+1)); in test_1() 168 …assert_se(q && json_variant_has_type(q, JSON_VARIANT_INTEGER) && json_variant_integer(q) == (i+1)); in test_1() 176 q = json_variant_by_key(p, "zap"); in test_1() 177 assert_se(q && json_variant_type(q) == JSON_VARIANT_NULL); in test_1() 181 JsonVariant *p, *q; in test_2() local 193 q = json_variant_by_index(p, 0); in test_2() 194 … assert_se(q && json_variant_type(q) == JSON_VARIANT_UNSIGNED && json_variant_unsigned(q) == 1); in test_2() 195 … assert_se(q && json_variant_has_type(q, JSON_VARIANT_INTEGER) && json_variant_integer(q) == 1); in test_2() [all …]
|
D | test-fs-util.c | 34 const char *top, *p, *pslash, *q, *qslash; in TEST() local 85 q = strjoina(temp, "/usr"); in TEST() 89 assert_se(path_equal(result, q)); in TEST() 92 qslash = strjoina(q, "/"); in TEST() 99 assert_se(mkdir(q, 0700) >= 0); in TEST() 103 assert_se(path_equal(result, q)); in TEST() 137 assert_se(r > 0 && path_equal(result, q)); in TEST() 144 assert_se(r > 0 && path_equal(result, q)); in TEST() 160 assert_se(path_equal(result, q)); in TEST() 170 q = strjoina(temp, "/user/root"); in TEST() [all …]
|
/systemd-251/src/libsystemd/sd-journal/ |
D | lookup3.c | 873 uint8_t q[] = "This is the time for all good men to come to the aid of their country..."; in driver3() local 885 hashword((const uint32_t *)q, (sizeof(q)-1)/4, 13), in driver3() 886 hashword((const uint32_t *)q, (sizeof(q)-5)/4, 13), in driver3() 887 hashword((const uint32_t *)q, (sizeof(q)-9)/4, 13)); in driver3() 888 p = q; in driver3() 890 hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13), in driver3() 891 hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13), in driver3() 892 hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13), in driver3() 893 hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13), in driver3() 894 hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13), in driver3() [all …]
|
/systemd-251/docs/assets/ |
D | systemd-logo.svg | 4 …q-4.5-.96-4.5-3.878 0-1.079.609-1.981.621-.902 1.781-1.441 1.16-.54 2.707-.54 1.63 0 2.848.528 1.2…
|
/systemd-251/coccinelle/ |
D | malloc_multiply.cocci | 3 expression q, n, m; 5 - q = malloc((n)*(m)) 6 + q = malloc_multiply(n, m) 8 expression q, n, m; 10 - q = malloc(n*(m)) 11 + q = malloc_multiply(n, m) 13 expression q, n, m; 15 - q = malloc((n)*m) 16 + q = malloc_multiply(n, m) 18 expression q, n, m; [all …]
|
D | reallocarray.cocci | 3 expression q, p, n, m; 5 - q = realloc(p, (n)*(m)) 6 + q = reallocarray(p, n, m) 8 expression q, p, n, m; 10 - q = realloc(p, n*(m)) 11 + q = reallocarray(p, n, m) 13 expression q, p, n, m; 15 - q = realloc(p, (n)*m) 16 + q = reallocarray(p, n, m) 18 expression q, p, n, m; [all …]
|
/systemd-251/src/systemd/ |
D | sd-resolve.h | 43 typedef int (*sd_resolve_getaddrinfo_handler_t)(sd_resolve_query *q, int ret, const struct addrinfo… 44 typedef int (*sd_resolve_getnameinfo_handler_t)(sd_resolve_query *q, int ret, const char *host, con… 94 int sd_resolve_getaddrinfo(sd_resolve *resolve, sd_resolve_query **q, const char *node, const char … 102 int sd_resolve_getnameinfo(sd_resolve *resolve, sd_resolve_query **q, const struct sockaddr *sa, so… 104 sd_resolve_query *sd_resolve_query_ref(sd_resolve_query *q); 105 sd_resolve_query *sd_resolve_query_unref(sd_resolve_query *q); 108 int sd_resolve_query_is_done(sd_resolve_query *q); 110 void *sd_resolve_query_get_userdata(sd_resolve_query *q); 111 void *sd_resolve_query_set_userdata(sd_resolve_query *q, void *userdata); 112 int sd_resolve_query_get_destroy_callback(sd_resolve_query *q, sd_resolve_destroy_t *destroy_callba… [all …]
|
/systemd-251/src/update-utmp/ |
D | update-utmp.c | 116 int r = 0, q; in on_reboot() local 142 q = utmp_put_reboot(boottime); in on_reboot() 143 if (q < 0) in on_reboot() 144 r = log_error_errno(q, "Failed to write utmp record: %m"); in on_reboot() 150 int r = 0, q; in on_shutdown() local 164 q = utmp_put_shutdown(); in on_shutdown() 165 if (q < 0) in on_shutdown() 166 r = log_error_errno(q, "Failed to write utmp record: %m"); in on_shutdown() 172 int r = 0, q, previous, runlevel; in on_runlevel() local 180 q = utmp_get_runlevel(&previous, NULL); in on_runlevel() [all …]
|
/systemd-251/src/core/ |
D | smack-setup.c | 93 int q; in write_access2_rules() local 95 q = read_line(policy, NAME_MAX, &buf); in write_access2_rules() 96 if (q < 0) in write_access2_rules() 97 … return log_error_errno(q, "Failed to read line from '%s': %m", entry->d_name); in write_access2_rules() 98 if (q == 0) in write_access2_rules() 158 int q; in write_cipso2_rules() local 160 q = read_line(policy, NAME_MAX, &buf); in write_cipso2_rules() 161 if (q < 0) in write_cipso2_rules() 162 … return log_error_errno(q, "Failed to read line from '%s': %m", entry->d_name); in write_cipso2_rules() 163 if (q == 0) in write_cipso2_rules() [all …]
|