Home
last modified time | relevance | path

Searched refs:k (Results 1 – 25 of 340) sorted by relevance

12345678910>>...14

/systemd-251/src/libsystemd/sd-journal/
Dlookup3.c78 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) argument
184 const uint32_t *k, /* the key, an array of uint32_t values */ in jenkins_hashword() argument
196 a += k[0]; in jenkins_hashword()
197 b += k[1]; in jenkins_hashword()
198 c += k[2]; in jenkins_hashword()
201 k += 3; in jenkins_hashword()
207 case 3 : c+=k[2]; in jenkins_hashword()
208 case 2 : b+=k[1]; in jenkins_hashword()
209 case 1 : a+=k[0]; in jenkins_hashword()
227 const uint32_t *k, /* the key, an array of uint32_t values */ in jenkins_hashword2() argument
[all …]
/systemd-251/src/libsystemd/sd-device/
Ddevice-enumerator.c597 int k, r = 0; in enumerator_add_parent_devices() local
605 k = sd_device_get_parent(device, &device); in enumerator_add_parent_devices()
606 if (k == -ENOENT) /* Reached the top? */ in enumerator_add_parent_devices()
608 if (k < 0) { in enumerator_add_parent_devices()
609 r = k; in enumerator_add_parent_devices()
613 k = sd_device_get_subsystem(device, &ss); in enumerator_add_parent_devices()
614 if (k == -ENOENT) /* Has no subsystem? */ in enumerator_add_parent_devices()
616 if (k < 0) { in enumerator_add_parent_devices()
617 r = k; in enumerator_add_parent_devices()
624 k = sd_device_get_sysname(device, &usn); in enumerator_add_parent_devices()
[all …]
/systemd-251/src/basic/
Dprioq.c67 static void swap(Prioq *q, unsigned j, unsigned k) { in swap() argument
70 assert(k < q->n_items); in swap()
73 assert(!q->items[k].idx || *(q->items[k].idx) == k); 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()
81 if (q->items[k].idx) in swap()
82 *q->items[k].idx = k; in swap()
90 unsigned k; in shuffle_up() local
92 k = (idx-1)/2; in shuffle_up()
94 if (q->compare_func(q->items[k].data, q->items[idx].data) <= 0) in shuffle_up()
[all …]
Denv-util.c100 size_t k; in strv_env_is_valid() local
106 k = strcspn(*p, "="); in strv_env_is_valid()
108 if (strneq(*p, *q, k) && (*q)[k] == '=') in strv_env_is_valid()
139 static int env_append(char **r, char ***k, char **a) { in env_append() argument
141 assert(k); in env_append()
142 assert(*k >= r); in env_append()
162 for (j = r; j < *k; j++) in env_append()
170 if (j >= *k) { /* Append to the end? */ in env_append()
171 (*k)[0] = c; in env_append()
172 (*k)[1] = NULL; in env_append()
[all …]
Dglob-util.c20 int k; in safe_glob() local
37 k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); in safe_glob()
38 if (k == GLOB_NOMATCH) in safe_glob()
40 if (k == GLOB_NOSPACE) in safe_glob()
42 if (k != 0) in safe_glob()
52 int k; in glob_exists() local
56 k = safe_glob(path, GLOB_NOSORT|GLOB_BRACE, &g); in glob_exists()
57 if (k == -ENOENT) in glob_exists()
59 if (k < 0) in glob_exists()
60 return k; in glob_exists()
[all …]
Dtime-util.c537 int k = 0; in format_timespan() local
570 k = snprintf(p, l, in format_timespan()
585 k = snprintf(p, l, in format_timespan()
594 n = MIN((size_t) k, l); in format_timespan()
628 const char *k, *utc = NULL, *tzn = NULL; in parse_timestamp_impl() local
676 } else if ((k = endswith(t, " ago"))) { in parse_timestamp_impl()
677 t = strndupa_safe(t, k - t); in parse_timestamp_impl()
685 } else if ((k = endswith(t, " left"))) { in parse_timestamp_impl()
686 t = strndupa_safe(t, k - t); in parse_timestamp_impl()
778 k = strptime(t, "%y-%m-%d %H:%M:%S", &tm); in parse_timestamp_impl()
[all …]
Dpath-util.c111 int r, k; in path_make_relative() local
128 k = path_find_first_component(&to, true, &t); in path_make_relative()
129 if (k < 0) in path_make_relative()
130 return k; in path_make_relative()
134 if (k == 0) { in path_make_relative()
155 if (r != k || !strneq(f, t, r)) in path_make_relative()
234 unsigned k = 0; in path_strv_resolve() local
303 l[k++] = u; in path_strv_resolve()
306 l[k] = NULL; in path_strv_resolve()
394 int r, k; in path_startswith_full() local
[all …]
Dreplace-var.c18 size_t k; in get_variable() local
27 k = strspn(b + 1, UPPERCASE_LETTERS "_"); in get_variable()
28 if (k <= 0 || b[k+1] != '@') in get_variable()
31 t = strndup(b + 1, k); in get_variable()
57 int k; in replace_var() local
60 k = get_variable(f, &v); in replace_var()
61 if (k < 0) in replace_var()
63 if (k == 0) { in replace_var()
Dio-util.c65 ssize_t k; in loop_read() local
67 k = read(fd, p, nbytes); in loop_read()
68 if (k < 0) { in loop_read()
85 if (k == 0) in loop_read()
88 assert((size_t) k <= nbytes); in loop_read()
90 p += k; in loop_read()
91 nbytes -= k; in loop_read()
92 n += k; in loop_read()
120 ssize_t k; in loop_write() local
122 k = write(fd, p, nbytes); in loop_write()
[all …]
/systemd-251/src/modules-load/
Dmodules-load.c35 _cleanup_strv_free_ char **k = NULL; in add_modules() local
37 k = strv_split(p, ","); in add_modules()
38 if (!k) in add_modules()
41 if (strv_extend_strv(&arg_proc_cmdline_modules, k, true) < 0) in add_modules()
83 int k; in apply_file() local
85 k = read_line(f, LONG_LINE_MAX, &line); in apply_file()
86 if (k < 0) in apply_file()
87 return log_error_errno(k, "Failed to read file '%s': %m", pp); in apply_file()
88 if (k == 0) in apply_file()
97 k = module_load_and_warn(ctx, l, true); in apply_file()
[all …]
/systemd-251/src/analyze/
Danalyze-verify-util.c155 int r = 0, k; in verify_executables() local
163 k = verify_executable(u, exec, root); in verify_executables()
164 if (k < 0 && r == 0) in verify_executables()
165 r = k; in verify_executables()
169 k = verify_executable(u, SERVICE(u)->exec_command[i], root); in verify_executables()
170 if (k < 0 && r == 0) in verify_executables()
171 r = k; in verify_executables()
176 k = verify_executable(u, SOCKET(u)->exec_command[i], root); in verify_executables()
177 if (k < 0 && r == 0) in verify_executables()
178 r = k; in verify_executables()
[all …]
/systemd-251/src/random-seed/
Drandom-seed.c113 ssize_t k, l; in run() local
208 k = loop_read(seed_fd, buf, buf_size, false); in run()
209 if (k < 0) in run()
210 log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m"); in run()
211 else if (k == 0) in run()
221 … sha256_process_bytes(&k, sizeof(k), &hash_state); /* Hash length to distinguish from new seed. */ in run()
222 sha256_process_bytes(buf, k, &hash_state); in run()
252 r = random_write_entropy(random_fd, buf, k, in run()
270 k = getrandom(buf, buf_size, GRND_NONBLOCK); in run()
271 if (k < 0 && errno == EAGAIN && synchronous) { in run()
[all …]
/systemd-251/src/sysctl/
Dsysctl.c123 int k; in apply_all() local
137 k = glob_extend(&paths, pattern, GLOB_NOCHECK); in apply_all()
138 if (k < 0) { in apply_all()
139 if (option->ignore_failure || ERRNO_IS_PRIVILEGE(k)) in apply_all()
140 … log_debug_errno(k, "Failed to resolve glob '%s', ignoring: %m", in apply_all()
143 log_error_errno(k, "Couldn't resolve glob '%s': %m", in apply_all()
146 r = k; in apply_all()
165k = sysctl_write_or_warn(key, option->value, option->ignore_failure); in apply_all()
167 r = k; in apply_all()
171k = sysctl_write_or_warn(option->key, option->value, option->ignore_failure); in apply_all()
[all …]
/systemd-251/src/core/
Dtransaction.c150 LIST_FOREACH(transaction, k, j->transaction_next) { in delete_one_unmergeable_job()
154 if (job_type_is_mergeable(j->type, k->type)) in delete_one_unmergeable_job()
159 if (!j->matters_to_anchor && !k->matters_to_anchor) { in delete_one_unmergeable_job()
174 log_unit_debug(k->unit, in delete_one_unmergeable_job()
176 k->unit->id, job_type_to_string(k->type), in delete_one_unmergeable_job()
177 … yes_no(k->type == JOB_STOP && job_is_conflicted_by(k))); in delete_one_unmergeable_job()
182 d = k; in delete_one_unmergeable_job()
186 } else if (k->type == JOB_STOP) { in delete_one_unmergeable_job()
188 if (job_is_conflicted_by(k)) in delete_one_unmergeable_job()
191 d = k; in delete_one_unmergeable_job()
[all …]
/systemd-251/src/binfmt/
Dbinfmt.c90 int k; in apply_file() local
92 k = read_line(f, LONG_LINE_MAX, &text); in apply_file()
93 if (k < 0) in apply_file()
94 return log_error_errno(k, "Failed to read file '%s': %m", pp); in apply_file()
95 if (k == 0) in apply_file()
104 k = apply_rule(filename, line, p); in apply_file()
105 if (k < 0 && r >= 0) in apply_file()
106 r = k; in apply_file()
193 int r, k; in run() local
210 k = apply_file(argv[i], false); in run()
[all …]
/systemd-251/src/delta/
Ddelta.c226 int k; in enumerate_dir_d() local
239 k = ordered_hashmap_put(top, d, p); in enumerate_dir_d()
240 if (k >= 0) { in enumerate_dir_d()
245 } else if (k != -EEXIST) { in enumerate_dir_d()
247 return k; in enumerate_dir_d()
252 k = ordered_hashmap_put(bottom, d, p); in enumerate_dir_d()
253 if (k < 0) { in enumerate_dir_d()
255 return k; in enumerate_dir_d()
275 k = ordered_hashmap_put(h, basename(p), p); in enumerate_dir_d()
276 if (k < 0) { in enumerate_dir_d()
[all …]
/systemd-251/src/test/
Dtest-varlink.c100 size_t k; in flood_test() local
112 for (k = 0; k < OVERLOAD_CONNECTIONS; k++) { in flood_test()
114 log_debug("connection %zu", k); in flood_test()
115 assert_se(varlink_connect_address(connections + k, address) >= 0); in flood_test()
117 assert_se(asprintf(&t, "flood-%zu", k) >= 0); in flood_test()
118 assert_se(varlink_set_description(connections[k], t) >= 0); in flood_test()
119 assert_se(varlink_attach_event(connections[k], e, k) >= 0); in flood_test()
120 …ssert_se(varlink_sendb(connections[k], "io.test.Rubbish", JSON_BUILD_OBJECT(JSON_BUILD_PAIR("id", … in flood_test()
127 assert_se(varlink_attach_event(c, e, k) >= 0); in flood_test()
139 for (k = 0; k < OVERLOAD_CONNECTIONS; k++) in flood_test()
[all …]
Dtest-seccomp.c235 const char *k, *p = NULL; in TEST() local
244 NULSTR_FOREACH(k, syscall_filter_sets[i].value) { in TEST()
248 (*p == '@' && *k != '@') || in TEST()
249 (((*p == '@' && *k == '@') || in TEST()
250 (*p != '@' && *k != '@')) && in TEST()
251 strcmp(p, k) < 0)); in TEST()
253 p = k; in TEST()
1003 int fd = -1, k = -1; in TEST() local
1027 k = real_open(z, O_CREAT|O_RDWR|O_CLOEXEC|O_EXCL, 0644 | S_ISUID); in TEST()
1028 k = safe_close(k); in TEST()
[all …]
/systemd-251/src/gpt-auto-generator/
Dgpt-auto-generator.c695 int r, k; in enumerate_partitions() local
724 k = add_swap(m->partitions + PARTITION_SWAP); in enumerate_partitions()
725 if (k < 0) in enumerate_partitions()
726 r = k; in enumerate_partitions()
730 k = add_xbootldr(m->partitions + PARTITION_XBOOTLDR); in enumerate_partitions()
731 if (k < 0) in enumerate_partitions()
732 r = k; in enumerate_partitions()
736 k = add_esp(m->partitions + PARTITION_ESP, m->partitions[PARTITION_XBOOTLDR].found); in enumerate_partitions()
737 if (k < 0) in enumerate_partitions()
738 r = k; in enumerate_partitions()
[all …]
/systemd-251/src/login/
Dlogind.c200 int k; in manager_enumerate_devices() local
202 k = manager_process_seat_device(m, d); in manager_enumerate_devices()
203 if (k < 0) in manager_enumerate_devices()
204 r = k; in manager_enumerate_devices()
235 int k; in manager_enumerate_buttons() local
237 k = manager_process_button_device(m, d); in manager_enumerate_buttons()
238 if (k < 0) in manager_enumerate_buttons()
239 r = k; in manager_enumerate_buttons()
265 int k; in manager_enumerate_seats() local
278 k = seat_load(s); in manager_enumerate_seats()
[all …]
/systemd-251/src/libsystemd/sd-bus/
Dbus-match.c566 enum bus_match_node_type bus_match_node_type_from_string(const char *k, size_t n) { in bus_match_node_type_from_string() argument
567 assert(k); in bus_match_node_type_from_string()
569 if (n == 4 && startswith(k, "type")) in bus_match_node_type_from_string()
571 if (n == 6 && startswith(k, "sender")) in bus_match_node_type_from_string()
573 if (n == 11 && startswith(k, "destination")) in bus_match_node_type_from_string()
575 if (n == 9 && startswith(k, "interface")) in bus_match_node_type_from_string()
577 if (n == 6 && startswith(k, "member")) in bus_match_node_type_from_string()
579 if (n == 4 && startswith(k, "path")) in bus_match_node_type_from_string()
581 if (n == 14 && startswith(k, "path_namespace")) in bus_match_node_type_from_string()
584 if (n == 4 && startswith(k, "arg")) { in bus_match_node_type_from_string()
[all …]
Dbus-socket.c128 ssize_t k; in bus_socket_write_auth() local
137k = writev(b->output_fd, b->auth_iovec + b->auth_index, ELEMENTSOF(b->auth_iovec) - b->auth_index); in bus_socket_write_auth()
144 k = sendmsg(b->output_fd, &mh, MSG_DONTWAIT|MSG_NOSIGNAL); in bus_socket_write_auth()
145 if (k < 0 && errno == ENOTSOCK) { in bus_socket_write_auth()
147k = writev(b->output_fd, b->auth_iovec + b->auth_index, ELEMENTSOF(b->auth_iovec) - b->auth_index); in bus_socket_write_auth()
151 if (k < 0) in bus_socket_write_auth()
154 iovec_advance(b->auth_iovec, &b->auth_index, (size_t) k); in bus_socket_write_auth()
518 ssize_t k; in bus_socket_read_auth() local
548 k = readv(b->input_fd, &iov, 1); in bus_socket_read_auth()
549 if (k < 0) in bus_socket_read_auth()
[all …]
/systemd-251/src/shared/
Duser-record.c94 static void pkcs11_encrypted_key_done(Pkcs11EncryptedKey *k) { in pkcs11_encrypted_key_done() argument
95 if (!k) in pkcs11_encrypted_key_done()
98 free(k->uri); in pkcs11_encrypted_key_done()
99 erase_and_free(k->data); in pkcs11_encrypted_key_done()
100 erase_and_free(k->hashed_password); in pkcs11_encrypted_key_done()
119 static void recovery_key_done(RecoveryKey *k) { in recovery_key_done() argument
120 if (!k) in recovery_key_done()
123 free(k->type); in recovery_key_done()
124 erase_and_free(k->hashed_password); in recovery_key_done()
458 uint64_t k; in json_dispatch_umask() local
[all …]
/systemd-251/src/nspawn/
Dnspawn-oci.c102 uint64_t k; in oci_console_dimension() local
106 k = json_variant_unsigned(variant); in oci_console_dimension()
107 if (k == 0) in oci_console_dimension()
110 … if (k > USHRT_MAX) /* TIOCSWINSZ's struct winsize uses "unsigned short" for width and height */ in oci_console_dimension()
114 *u = (unsigned) k; in oci_console_dimension()
349 int64_t k; in oci_oom_score_adj() local
353 k = json_variant_integer(v); in oci_oom_score_adj()
354 if (k < OOM_SCORE_ADJ_MIN || k > OOM_SCORE_ADJ_MAX) in oci_oom_score_adj()
356 "oomScoreAdj value out of range: %ji", k); in oci_oom_score_adj()
358 s->oom_score_adjust = (int) k; in oci_oom_score_adj()
[all …]
/systemd-251/src/libsystemd-network/
Dlldp-neighbor.c134 char *k; in parse_string() local
158 k = cescape_length(p, n); in parse_string()
159 if (!k) in parse_string()
163 *s = k; in parse_string()
408 char *k; in format_mac_address() local
417 k = new(char, ETHER_ADDR_TO_STRING_MAX); in format_mac_address()
418 if (!k) in format_mac_address()
421 *ret = ether_addr_to_string(&a, k); in format_mac_address()
445 char *k; in sd_lldp_neighbor_get_chassis_id_as_string() local
465 k = cescape_length((char*) n->id.chassis_id + 1, n->id.chassis_id_size - 1); in sd_lldp_neighbor_get_chassis_id_as_string()
[all …]

12345678910>>...14