/systemd-251/src/import/ |
D | pull-job.c | 23 void pull_job_close_disk_fd(PullJob *j) { in pull_job_close_disk_fd() argument 24 if (!j) in pull_job_close_disk_fd() 27 if (j->close_disk_fd) in pull_job_close_disk_fd() 28 safe_close(j->disk_fd); in pull_job_close_disk_fd() 30 j->disk_fd = -1; in pull_job_close_disk_fd() 33 PullJob* pull_job_unref(PullJob *j) { in pull_job_unref() argument 34 if (!j) in pull_job_unref() 37 pull_job_close_disk_fd(j); in pull_job_unref() 39 curl_glue_remove_and_free(j->glue, j->curl); in pull_job_unref() 40 curl_slist_free_all(j->request_header); in pull_job_unref() [all …]
|
D | pull-raw.c | 498 static void raw_pull_job_on_finished(PullJob *j) { in raw_pull_job_on_finished() argument 503 assert(j); in raw_pull_job_on_finished() 504 assert(j->userdata); in raw_pull_job_on_finished() 506 i = j->userdata; in raw_pull_job_on_finished() 508 if (j->error != 0) { in raw_pull_job_on_finished() 514 if (j == i->raw_job) { in raw_pull_job_on_finished() 515 if (j->error == ENOMEDIUM) /* HTTP 404 */ in raw_pull_job_on_finished() 516 … r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)"); in raw_pull_job_on_finished() 518 r = log_error_errno(j->error, "Failed to retrieve image file."); in raw_pull_job_on_finished() 520 } else if (j == i->checksum_job) { in raw_pull_job_on_finished() [all …]
|
D | pull-tar.c | 312 static void tar_pull_job_on_finished(PullJob *j) { in tar_pull_job_on_finished() argument 316 assert(j); in tar_pull_job_on_finished() 317 assert(j->userdata); in tar_pull_job_on_finished() 319 i = j->userdata; in tar_pull_job_on_finished() 321 if (j->error != 0) { in tar_pull_job_on_finished() 322 if (j == i->tar_job) { in tar_pull_job_on_finished() 323 if (j->error == ENOMEDIUM) /* HTTP 404 */ in tar_pull_job_on_finished() 324 … r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)"); in tar_pull_job_on_finished() 326 r = log_error_errno(j->error, "Failed to retrieve image file."); in tar_pull_job_on_finished() 328 } else if (j == i->checksum_job) { in tar_pull_job_on_finished() [all …]
|
/systemd-251/src/core/ |
D | job.c | 32 Job *j; in job_new_raw() local 38 j = new(Job, 1); in job_new_raw() 39 if (!j) in job_new_raw() 42 *j = (Job) { in job_new_raw() 48 return j; in job_new_raw() 52 Job *j; in job_new() local 56 j = job_new_raw(unit); in job_new() 57 if (!j) in job_new() 60 j->id = j->manager->current_job_id++; in job_new() 61 j->type = type; in job_new() [all …]
|
D | transaction.c | 14 static void transaction_unlink_job(Transaction *tr, Job *j, bool delete_dependencies); 16 static void transaction_delete_job(Transaction *tr, Job *j, bool delete_dependencies) { in transaction_delete_job() argument 18 assert(j); in transaction_delete_job() 22 transaction_unlink_job(tr, j, delete_dependencies); in transaction_delete_job() 24 job_free(j); in transaction_delete_job() 28 Job *j; in transaction_delete_unit() local 33 while ((j = hashmap_get(tr->jobs, u))) in transaction_delete_unit() 34 transaction_delete_job(tr, j, true); in transaction_delete_unit() 38 Job *j; in transaction_abort() local 42 while ((j = hashmap_first(tr->jobs))) in transaction_abort() [all …]
|
D | dbus-job.c | 30 Job *j = userdata; in property_get_unit() local 34 assert(j); in property_get_unit() 36 p = unit_dbus_path(j->unit); in property_get_unit() 40 return sd_bus_message_append(reply, "(so)", j->unit->id, p); in property_get_unit() 44 Job *j = userdata; in bus_job_method_cancel() local 48 assert(j); in bus_job_method_cancel() 50 r = mac_selinux_unit_access_check(j->unit, message, "stop", error); in bus_job_method_cancel() 55 if (!sd_bus_track_contains(j->bus_track, sd_bus_message_get_sender(message))) { in bus_job_method_cancel() 58 r = bus_verify_manage_units_async(j->unit->manager, message, error); in bus_job_method_cancel() 65 job_finish_and_invalidate(j, JOB_CANCELED, true, false); in bus_job_method_cancel() [all …]
|
D | job.h | 170 Job* job_install(Job *j); 171 int job_install_deserialized(Job *j); 172 void job_uninstall(Job *j); 173 void job_dump(Job *j, FILE *f, const char *prefix); 174 int job_serialize(Job *j, FILE *f); 175 int job_deserialize(Job *j, FILE *f); 176 int job_coldplug(Job *j); 181 int job_merge(Job *j, Job *other); 210 void job_add_to_run_queue(Job *j); 211 void job_add_to_dbus_queue(Job *j); [all …]
|
/systemd-251/src/libsystemd/sd-journal/ |
D | sd-journal.c | 55 static void remove_file_real(sd_journal *j, JournalFile *f); 57 static bool journal_pid_changed(sd_journal *j) { in journal_pid_changed() argument 58 assert(j); in journal_pid_changed() 63 return j->original_pid != getpid_cached(); in journal_pid_changed() 66 static int journal_put_error(sd_journal *j, int r, const char *path) { in journal_put_error() argument 90 k = hashmap_ensure_put(&j->errors, NULL, INT_TO_PTR(r), copy); in journal_put_error() 102 static void detach_location(sd_journal *j) { in detach_location() argument 105 assert(j); in detach_location() 107 j->current_file = NULL; in detach_location() 108 j->current_field = 0; in detach_location() [all …]
|
D | test-journal-match.c | 15 _cleanup_(sd_journal_closep) sd_journal *j = NULL; in main() 20 assert_se(sd_journal_open(&j, 0) >= 0); in main() 22 assert_se(sd_journal_add_match(j, "foobar", 0) < 0); in main() 23 assert_se(sd_journal_add_match(j, "foobar=waldo", 0) < 0); in main() 24 assert_se(sd_journal_add_match(j, "", 0) < 0); in main() 25 assert_se(sd_journal_add_match(j, "=", 0) < 0); in main() 26 assert_se(sd_journal_add_match(j, "=xxxxx", 0) < 0); in main() 27 assert_se(sd_journal_add_match(j, (uint8_t[4]){'A', '=', '\1', '\2'}, 4) >= 0); in main() 28 assert_se(sd_journal_add_match(j, (uint8_t[5]){'B', '=', 'C', '\0', 'D'}, 5) >= 0); in main() 29 assert_se(sd_journal_add_match(j, "HALLO=WALDO", 0) >= 0); in main() [all …]
|
D | journal-send.c | 141 int r, n = 0, i = 0, j; in fill_iovec_sprintf() local 195 for (j = 0; j < i; j++) in fill_iovec_sprintf() 196 free(iov[j].iov_base); in fill_iovec_sprintf() 204 int r, i, j; in sd_journal_send() local 220 for (j = 0; j < i; j++) in sd_journal_send() 221 free(iov[j].iov_base); in sd_journal_send() 234 int i, j = 0; in sd_journal_sendv() local 277 w[j++] = IOVEC_MAKE(iov[i].iov_base, c - (char*) iov[i].iov_base); in sd_journal_sendv() 278 w[j++] = IOVEC_MAKE_STRING("\n"); in sd_journal_sendv() 281 w[j++] = IOVEC_MAKE(&l[i], sizeof(uint64_t)); in sd_journal_sendv() [all …]
|
/systemd-251/src/systemd/ |
D | sd-journal.h | 92 void sd_journal_close(sd_journal *j); 94 int sd_journal_previous(sd_journal *j); 95 int sd_journal_next(sd_journal *j); 97 int sd_journal_previous_skip(sd_journal *j, uint64_t skip); 98 int sd_journal_next_skip(sd_journal *j, uint64_t skip); 100 int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret); 101 int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t *ret_boot_id); 103 int sd_journal_set_data_threshold(sd_journal *j, size_t sz); 104 int sd_journal_get_data_threshold(sd_journal *j, size_t *sz); 106 int sd_journal_get_data(sd_journal *j, const char *field, const void **data, size_t *l); [all …]
|
/systemd-251/src/journal/ |
D | test-journal-stream.c | 22 static void verify_contents(sd_journal *j, unsigned skip) { in verify_contents() argument 25 assert_se(j); in verify_contents() 28 SD_JOURNAL_FOREACH(j) { in verify_contents() 34 assert_se(sd_journal_get_cursor(j, &k) >= 0); in verify_contents() 38 assert_se(sd_journal_get_data(j, "MAGIC", &d, &l) >= 0); in verify_contents() 41 assert_se(sd_journal_get_data(j, "NUMBER", &d, &l) >= 0); in verify_contents() 53 assert_se(sd_journal_get_cursor(j, &c) >= 0); in verify_contents() 54 assert_se(sd_journal_test_cursor(j, c) > 0); in verify_contents() 67 _cleanup_(sd_journal_closep) sd_journal *j = NULL; in run_test() 123 assert_se(sd_journal_open_directory(&j, t, 0) >= 0); in run_test() [all …]
|
D | journalctl.c | 195 static int add_matches_for_device(sd_journal *j, const char *devpath) { in add_matches_for_device() argument 201 assert(j); in add_matches_for_device() 232 r = sd_journal_add_match(j, match, 0); in add_matches_for_device() 247 r = sd_journal_add_match(j, match1, 0); in add_matches_for_device() 259 r = add_match_this_boot(j, arg_machine); in add_matches_for_device() 1148 static int add_matches(sd_journal *j, char **args) { in add_matches() argument 1151 assert(j); in add_matches() 1159 r = sd_journal_add_disjunction(j); in add_matches() 1198 r = sd_journal_add_match(j, t, 0); in add_matches() 1201 r = sd_journal_add_match(j, t2, 0); in add_matches() [all …]
|
D | test-journal-interleaving.c | 73 static void test_check_number(sd_journal *j, int n) { in test_check_number() argument 79 assert_ret(sd_journal_get_data(j, "NUMBER", &d, &l)); in test_check_number() 87 static void test_check_numbers_down(sd_journal *j, int count) { in test_check_numbers_down() argument 92 test_check_number(j, i); in test_check_numbers_down() 93 assert_ret(r = sd_journal_next(j)); in test_check_numbers_down() 102 static void test_check_numbers_up(sd_journal *j, int count) { in test_check_numbers_up() argument 105 test_check_number(j, i); in test_check_numbers_up() 106 assert_ret(r = sd_journal_previous(j)); in test_check_numbers_up() 150 sd_journal *j; in test_skip_one() local 159 assert_ret(sd_journal_open_directory(&j, t, 0)); in test_skip_one() [all …]
|
/systemd-251/src/shared/ |
D | logs-show.c | 52 static int print_catalog(FILE *f, sd_journal *j) { in print_catalog() argument 57 assert(j); in print_catalog() 59 r = sd_journal_get_catalog(j, &t); in print_catalog() 85 static int url_from_catalog(sd_journal *j, char **ret) { in url_from_catalog() argument 90 assert(j); in url_from_catalog() 93 r = sd_journal_get_catalog(j, &t); in url_from_catalog() 321 static int output_timestamp_monotonic(FILE *f, sd_journal *j, const char *monotonic) { in output_timestamp_monotonic() argument 327 assert(j); in output_timestamp_monotonic() 333 r = sd_journal_get_monotonic_usec(j, &t, &boot_id); in output_timestamp_monotonic() 341 static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, OutputFlags flags, co… in output_timestamp_realtime() argument [all …]
|
D | device-nodes.c | 20 size_t i, j; in encode_devnode_name() local 25 for (i = 0, j = 0; str[i] != '\0'; i++) { in encode_devnode_name() 31 if (len-j < (size_t) seqlen) in encode_devnode_name() 34 memcpy(&str_enc[j], &str[i], seqlen); in encode_devnode_name() 35 j += seqlen; in encode_devnode_name() 40 if (len-j < 4) in encode_devnode_name() 43 sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); in encode_devnode_name() 44 j += 4; in encode_devnode_name() 47 if (len-j < 1) in encode_devnode_name() 50 str_enc[j] = str[i]; in encode_devnode_name() [all …]
|
D | journal-util.c | 12 static int access_check_var_log_journal(sd_journal *j, bool want_other_users) { in access_check_var_log_journal() argument 15 assert(j); in access_check_var_log_journal() 82 int journal_access_blocked(sd_journal *j) { in journal_access_blocked() argument 83 return hashmap_contains(j->errors, INT_TO_PTR(-EACCES)); in journal_access_blocked() 86 int journal_access_check_and_warn(sd_journal *j, bool quiet, bool want_other_users) { in journal_access_check_and_warn() argument 91 assert(j); in journal_access_check_and_warn() 93 if (hashmap_isempty(j->errors)) { in journal_access_check_and_warn() 94 if (ordered_hashmap_isempty(j->files) && !quiet) in journal_access_check_and_warn() 100 if (journal_access_blocked(j)) { in journal_access_check_and_warn() 102 (void) access_check_var_log_journal(j, want_other_users); in journal_access_check_and_warn() [all …]
|
D | format-table.c | 2026 for (size_t j = 0; j < display_columns; j++) { in table_print() local 2027 minimum_width[j] = 1; in table_print() 2028 maximum_width[j] = SIZE_MAX; in table_print() 2034 for (size_t j = 0; j < display_columns; j++) in table_print() local 2035 requested_width[j] = SIZE_MAX; in table_print() 2046 for (size_t j = 0; j < display_columns; j++) { in table_print() local 2050 assert_se(d = row[t->display_map ? t->display_map[j] : j]); in table_print() 2053 width ? width[j] : SIZE_MAX, in table_print() 2067 width ? width[j] : SIZE_MAX, in table_print() 2083 if (requested_width[j] == SIZE_MAX || in table_print() [all …]
|
D | userdb-dropin.c | 35 _cleanup_free_ char *d = NULL, *j = NULL; in load_user() local 50 j = strjoin(d, "/", name, ".user-privileged"); in load_user() 51 if (!j) in load_user() 55 if (asprintf(&j, "%s/" UID_FMT ".user-privileged", d, uid) < 0) in load_user() 59 r = json_parse_file(NULL, j, JSON_PARSE_SENSITIVE, &privileged_v, NULL, NULL); in load_user() 116 const char *j; in dropin_user_record_by_name() local 118 j = strjoina(name, ".user"); in dropin_user_record_by_name() 119 …if (!filename_is_valid(j)) /* Doesn't qualify as valid filename? Then it's definitely not provided… in dropin_user_record_by_name() 122 … r = search_and_fopen_nulstr(j, "re", NULL, USERDB_DROPIN_DIR_NULSTR("userdb"), &f, &found_path); in dropin_user_record_by_name() 187 _cleanup_free_ char *d = NULL, *j = NULL; in load_group() local [all …]
|
/systemd-251/src/coredump/ |
D | coredumpctl.c | 64 static int add_match(sd_journal *j, const char *match) { in add_match() argument 86 r = sd_journal_add_match(j, pattern, 0); in add_match() 93 static int add_matches(sd_journal *j, char **matches) { in add_matches() argument 96 r = sd_journal_add_match(j, "MESSAGE_ID=" SD_MESSAGE_COREDUMP_STR, 0); in add_matches() 100 r = sd_journal_add_match(j, "MESSAGE_ID=" SD_MESSAGE_BACKTRACE_STR, 0); in add_matches() 105 r = add_match(j, *match); in add_matches() 114 _cleanup_(sd_journal_closep) sd_journal *j = NULL; in acquire_journal() 120 r = sd_journal_open_directory(&j, arg_directory, 0); in acquire_journal() 124 r = sd_journal_open_files(&j, (const char**)arg_file, 0); in acquire_journal() 128 r = sd_journal_open(&j, arg_all ? 0 : SD_JOURNAL_LOCAL_ONLY); in acquire_journal() [all …]
|
/systemd-251/src/test/ |
D | test-siphash24.c | 12 unsigned i, j; in test_alignment_one() local 38 for (j = i; j < len; j++) { in test_alignment_one() 41 siphash24_compress(&in[i], j - i, &state); in test_alignment_one() 42 siphash24_compress(&in[j], len - j, &state); in test_alignment_one() 75 unsigned i, j; in TEST() local 94 for (j = 1; j <= sizeof one; j++) { in TEST() 96 siphash24_compress(one, j, &state1); in TEST() 99 two[j-1] = one[j-1]; in TEST() 100 siphash24_compress(two, j, &state2); in TEST()
|
/systemd-251/src/basic/ |
D | prioq.c | 67 static void swap(Prioq *q, unsigned j, unsigned k) { in swap() argument 69 assert(j < q->n_items); in swap() 72 assert(!q->items[j].idx || *(q->items[j].idx) == j); in swap() 75 SWAP_TWO(q->items[j].data, q->items[k].data); 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() 108 unsigned j, k, s; in shuffle_down() local 111 j = k-1; /* left child */ in shuffle_down() 113 if (j >= q->n_items) in shuffle_down() [all …]
|
D | io-util.h | 30 for (size_t j = 0; j < n; j++) in IOVEC_TOTAL_SIZE() local 31 r += i[j].iov_len; in IOVEC_TOTAL_SIZE() 40 for (size_t j = 0; j < n; j++) { in IOVEC_INCREMENT() local 43 if (i[j].iov_len == 0) in IOVEC_INCREMENT() 48 sub = MIN(i[j].iov_len, k); in IOVEC_INCREMENT() 49 i[j].iov_len -= sub; in IOVEC_INCREMENT() 50 i[j].iov_base = (uint8_t*) i[j].iov_base + sub; in IOVEC_INCREMENT()
|
/systemd-251/src/systemctl/ |
D | systemctl-sysv-compat.c | 151 int j; in enable_sysv_units() local 161 j = unit_file_exists(arg_scope, &paths, name); in enable_sysv_units() 162 if (j < 0 && !IN_SET(j, -ELOOP, -ERFKILL, -EADDRNOTAVAIL)) in enable_sysv_units() 163 return log_error_errno(j, "Failed to look up unit file state: %m"); in enable_sysv_units() 164 found_native = j != 0; in enable_sysv_units() 212 …j = safe_fork("(sysv-install)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG,… in enable_sysv_units() 213 if (j < 0) in enable_sysv_units() 214 return j; in enable_sysv_units() 215 if (j == 0) { in enable_sysv_units() 222 j = wait_for_terminate_and_check("sysv-install", pid, WAIT_LOG_ABNORMAL); in enable_sysv_units() [all …]
|
/systemd-251/src/network/ |
D | networkd-bridge-vlan.c | 31 int j; in find_next_bit() local 41 j = __builtin_ffs(x >> i); in find_next_bit() 42 return j ? j + i : 0; in find_next_bit() 73 int j = find_next_bit(i, vid_map); in bridge_vlan_append_info() local 74 if (j > 0) { in bridge_vlan_append_info() 77 begin = end = j - 1 + base_bit; in bridge_vlan_append_info() 78 untagged = is_bit_set(j - 1, untagged_map); in bridge_vlan_append_info() 83 …if (j - 2 + base_bit == end && untagged == is_bit_set(j - 1, untagged_map) && (uint16_t)j - 1 + ba… in bridge_vlan_append_info() 128 if (j > 0) { in bridge_vlan_append_info() 129 begin = end = j - 1 + base_bit; in bridge_vlan_append_info() [all …]
|