Home
last modified time | relevance | path

Searched refs:dest (Results 1 – 25 of 83) sorted by relevance

1234

/systemd-251/src/basic/
Dstrxcpyx.c21 size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool *ret_truncated) { in strnpcpy_full() argument
24 assert(dest); in strnpcpy_full()
35 *dest = mempcpy(*dest, src, size-1); in strnpcpy_full()
39 *dest = mempcpy(*dest, src, len); in strnpcpy_full()
46 *dest[0] = '\0'; in strnpcpy_full()
50 size_t strpcpy_full(char **dest, size_t size, const char *src, bool *ret_truncated) { in strpcpy_full() argument
51 assert(dest); in strpcpy_full()
54 return strnpcpy_full(dest, size, src, strlen(src), ret_truncated); in strpcpy_full()
57 size_t strpcpyf_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) { in strpcpyf_full() argument
62 assert(dest); in strpcpyf_full()
[all …]
Dstrxcpyx.h9 size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool *ret_truncated);
10 static inline size_t strnpcpy(char **dest, size_t size, const char *src, size_t len) { in strnpcpy() argument
11 return strnpcpy_full(dest, size, src, len, NULL); in strnpcpy()
13 size_t strpcpy_full(char **dest, size_t size, const char *src, bool *ret_truncated);
14 static inline size_t strpcpy(char **dest, size_t size, const char *src) { in strpcpy() argument
15 return strpcpy_full(dest, size, src, NULL); in strpcpy()
17 size_t strpcpyf_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) _printf_(…
18 #define strpcpyf(dest, size, src, ...) \ argument
19 strpcpyf_full((dest), (size), NULL, (src), ##__VA_ARGS__)
20 size_t strpcpyl_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) _sentinel…
[all …]
/systemd-251/src/nspawn/
Dnspawn-cgroup.c246 const char *dest, in mount_legacy_cgroup_hierarchy() argument
254 to = strjoina(strempty(dest), "/sys/fs/cgroup/", hierarchy); in mount_legacy_cgroup_hierarchy()
256 r = path_is_mount_point(to, dest, 0); in mount_legacy_cgroup_hierarchy()
294 const char *dest, in mount_legacy_cgns_supported() argument
308 r = path_is_mount_point(cgroup_root, dest, AT_SYMLINK_FOLLOW); in mount_legacy_cgns_supported()
401 const char *dest, in mount_legacy_cgns_unsupported() argument
412 cgroup_root = prefix_roota(dest, "/sys/fs/cgroup"); in mount_legacy_cgns_unsupported()
417 r = path_is_mount_point(cgroup_root, dest, AT_SYMLINK_FOLLOW); in mount_legacy_cgns_unsupported()
458 r = mount_legacy_cgroup_hierarchy(dest, controller, controller, true); in mount_legacy_cgns_unsupported()
467 target = path_join(dest, origin); in mount_legacy_cgns_unsupported()
[all …]
Dnspawn-mount.c95 static char *resolve_source_path(const char *dest, const char *source) { in resolve_source_path() argument
100 return path_join(dest, source + 1); in resolve_source_path()
129 int custom_mount_prepare_all(const char *dest, CustomMount *l, size_t n) { in custom_mount_prepare_all() argument
154 s = resolve_source_path(dest, m->source); in custom_mount_prepare_all()
172 s = resolve_source_path(dest, *j); in custom_mount_prepare_all()
182 s = resolve_source_path(dest, m->source); in custom_mount_prepare_all()
196 s = resolve_source_path(dest, m->work_dir); in custom_mount_prepare_all()
406 int mount_sysfs(const char *dest, MountSettingsMask mount_settings) { in mount_sysfs() argument
411 top = prefix_roota(dest, "/sys"); in mount_sysfs()
474 int mount_all(const char *dest, in mount_all() argument
[all …]
Dnspawn-mount.h51 int custom_mount_prepare_all(const char *dest, CustomMount *l, size_t n);
58 int mount_all(const char *dest, MountSettingsMask mount_settings, uid_t uid_shift, const char *seli…
59 int mount_sysfs(const char *dest, MountSettingsMask mount_settings);
61 int mount_custom(const char *dest, CustomMount *mounts, size_t n, uid_t uid_shift, uid_t uid_range,…
Dnspawn-cgroup.h13 int mount_cgroups(const char *dest, CGroupUnified unified_requested, bool userns, uid_t uid_shift, …
14 int mount_systemd_cgroup_writable(const char *dest, CGroupUnified unified_requested);
/systemd-251/src/nss-systemd/
Dnss-systemd.c143 struct passwd *dest, in copy_synthesized_passwd() argument
150 assert(dest); in copy_synthesized_passwd()
171 *dest = *src; in copy_synthesized_passwd()
174 dest->pw_name = buffer; in copy_synthesized_passwd()
175 dest->pw_passwd = stpcpy(dest->pw_name, src->pw_name) + 1; in copy_synthesized_passwd()
176 dest->pw_gecos = stpcpy(dest->pw_passwd, src->pw_passwd) + 1; in copy_synthesized_passwd()
177 dest->pw_dir = stpcpy(dest->pw_gecos, src->pw_gecos) + 1; in copy_synthesized_passwd()
178 dest->pw_shell = stpcpy(dest->pw_dir, src->pw_dir) + 1; in copy_synthesized_passwd()
179 strcpy(dest->pw_shell, src->pw_shell); in copy_synthesized_passwd()
185 struct spwd *dest, in copy_synthesized_spwd() argument
[all …]
/systemd-251/src/libsystemd/sd-bus/
Dbus-error.c292 _public_ int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e) { in sd_bus_error_copy() argument
296 if (!dest) in sd_bus_error_copy()
299 assert_return(!bus_error_is_dirty(dest), -EINVAL); in sd_bus_error_copy()
308 *dest = *e; in sd_bus_error_copy()
310 dest->name = strdup(e->name); in sd_bus_error_copy()
311 if (!dest->name) { in sd_bus_error_copy()
312 *dest = BUS_ERROR_OOM; in sd_bus_error_copy()
317 dest->message = strdup(e->message); in sd_bus_error_copy()
319 dest->_need_free = 1; in sd_bus_error_copy()
326 _public_ int sd_bus_error_move(sd_bus_error *dest, sd_bus_error *e) { in sd_bus_error_move() argument
[all …]
/systemd-251/src/network/netdev/
Dmacsec.c548 void *dest; in config_parse_macsec_port() local
560 dest = &s->port; in config_parse_macsec_port()
566 dest = &c->sci.port; in config_parse_macsec_port()
574 dest = &b->sci.port; in config_parse_macsec_port()
585 unaligned_write_be16(dest, port); in config_parse_macsec_port()
652 uint32_t val, *dest; in config_parse_macsec_packet_number() local
668 dest = a ? &a->sa.packet_number : &b->sa.packet_number; in config_parse_macsec_packet_number()
682 *dest = val; in config_parse_macsec_packet_number()
705 SecurityAssociation *dest; in config_parse_macsec_key() local
724 dest = a ? &a->sa : &b->sa; in config_parse_macsec_key()
[all …]
/systemd-251/src/import/
Dimport-fs.c104 const char *path = NULL, *local = NULL, *dest = NULL; in import_fs() local
182 dest = final_path; in import_fs()
188 dest = temp_path; in import_fs()
191 (void) mkdir_parents_label(dest, 0700); in import_fs()
201 dest, in import_fs()
213 dest, in import_fs()
229 r = import_mangle_os_tree(dest); in import_fs()
236 (void) import_assign_pool_quota_and_warn(dest); in import_fs()
239 r = install_file(AT_FDCWD, dest, in import_fs()
/systemd-251/src/libsystemd-network/
Ddhcp6-network.c63 union sockaddr_union dest = { in dhcp6_network_send_udp_socket() local
71 memcpy(&dest.in6.sin6_addr, server_address, sizeof(dest.in6.sin6_addr)); in dhcp6_network_send_udp_socket()
73 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in6)); in dhcp6_network_send_udp_socket()
/systemd-251/src/shared/
Dmount-util.c780 const char *dest, in mount_in_namespace() argument
801 assert(dest); in mount_in_namespace()
945 (void) mkdir_parents(dest, 0755); in mount_in_namespace()
946 (void) make_mount_point_inode_from_stat(&st, dest, 0700); in mount_in_namespace()
948 (void) mkdir_p(dest, 0755); in mount_in_namespace()
953 r = mount_nofollow_verbose(LOG_ERR, mount_inside, dest, NULL, MS_MOVE, NULL); in mount_in_namespace()
1013 const char *dest, in bind_mount_in_namespace() argument
1017 …return mount_in_namespace(target, propagate_path, incoming_path, src, dest, read_only, make_file_o… in bind_mount_in_namespace()
1025 const char *dest, in mount_image_in_namespace() argument
1030 …return mount_in_namespace(target, propagate_path, incoming_path, src, dest, read_only, make_file_o… in mount_image_in_namespace()
[all …]
Dmount-util.h96 int mode_to_inaccessible_node(const char *runtime_dir, mode_t mode, char **dest);
110 … *propagate_path, const char *incoming_path, const char *src, const char *dest, bool read_only, bo…
111 … *propagate_path, const char *incoming_path, const char *src, const char *dest, bool read_only, bo…
129 int make_mount_point_inode_from_stat(const struct stat *st, const char *dest, mode_t mode);
130 int make_mount_point_inode_from_path(const char *source, const char *dest, mode_t mode);
Dsmack-util.c239 int mac_smack_copy(const char *dest, const char *src) { in mac_smack_copy() argument
243 assert(dest); in mac_smack_copy()
250 r = mac_smack_apply(dest, SMACK_ATTR_ACCESS, label); in mac_smack_copy()
290 int mac_smack_copy(const char *dest, const char *src) { in mac_smack_copy() argument
Ddns-domain.h19 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags);
20 int dns_label_unescape_suffix(const char *name, const char **label_end, char *dest, size_t sz);
21 int dns_label_escape(const char *p, size_t l, char *dest, size_t sz);
/systemd-251/src/fstab-generator/
Dfstab-generator.c342 const char *dest, in add_mount() argument
409 r = generator_open_unit_file(dest, fstab_path(), name, &f); in add_mount()
443 r = generator_write_fsck_deps(f, dest, what, where, fstype); in add_mount()
478 r = generator_write_timeouts(dest, what, where, opts, &filtered); in add_mount()
482 r = generator_write_device_deps(dest, what, where, opts); in add_mount()
502 r = generator_hook_up_mkfs(dest, what, where, fstype); in add_mount()
508 r = generator_hook_up_growfs(dest, where, post); in add_mount()
515 r = generator_add_symlink(dest, post, in add_mount()
521 r = generator_add_symlink(dest, *s, "wants", name); in add_mount()
527 r = generator_add_symlink(dest, *s, "requires", name); in add_mount()
[all …]
/systemd-251/src/libsystemd/sd-device/
Ddevice-private.c795 _cleanup_(sd_device_unrefp) sd_device *dest = NULL; in device_shallow_clone()
802 r = device_new_aux(&dest); in device_shallow_clone()
806 r = device_set_syspath(dest, device->syspath, false); in device_shallow_clone()
811 r = device_set_subsystem(dest, val); in device_shallow_clone()
815 r = free_and_strdup(&dest->driver_subsystem, device->driver_subsystem); in device_shallow_clone()
824 r = device_set_ifindex(dest, val); in device_shallow_clone()
833 r = device_set_devnum(dest, val, minor); in device_shallow_clone()
838 r = device_read_uevent_file(dest); in device_shallow_clone()
842 *ret = TAKE_PTR(dest); in device_shallow_clone()
847 _cleanup_(sd_device_unrefp) sd_device *dest = NULL; in device_clone_with_db()
[all …]
/systemd-251/test/
Dtest-functions1411 if [[ -f "$dest" ]]; then
1416 lcov --directory "${root}/${BUILD_DIR:?}" --capture --output-file "${dest}.new"
1417 lcov --remove "${dest}.new" -o "${dest}.new" '/usr/include/*' '/usr/lib/*'
1418 lcov --add-tracefile "${dest}" --add-tracefile "${dest}.new" -o "${dest}"
1419 rm -f "${dest}.new"
1421 lcov --directory "${root}/${BUILD_DIR:?}" --capture --output-file "${dest}"
1422 lcov --remove "${dest}" -o "${dest}" '/usr/include/*' '/usr/lib/*'
1461 cp -a "$j" "$dest"
1463 "$SYSTEMD_JOURNAL_REMOTE" -o "$dest" --getter="$JOURNALCTL -o export -D $j"
1480 setfacl -m "user:${SUDO_USER:?}:r-X" "$dest"*
[all …]
/systemd-251/src/machine/
Dmachine-dbus.c844 const char *dest, *src, *propagate_directory; in bus_machine_method_bind_mount() local
855 r = sd_bus_message_read(message, "ssbb", &src, &dest, &read_only, &make_file_or_directory); in bus_machine_method_bind_mount()
862 if (isempty(dest)) in bus_machine_method_bind_mount()
863 dest = src; in bus_machine_method_bind_mount()
864 else if (!path_is_absolute(dest) || !path_is_normalized(dest)) in bus_machine_method_bind_mount()
871 "dest", dest, in bus_machine_method_bind_mount()
899 src, dest, read_only, make_file_or_directory); in bus_machine_method_bind_mount()
901 …d_bus_error_set_errnof(error, r, "Failed to mount %s on %s in machine's namespace: %m", src, dest); in bus_machine_method_bind_mount()
907 …const char *src, *dest, *host_path, *container_path, *host_basename, *container_basename, *contain… in bus_machine_method_copy() local
927 r = sd_bus_message_read(message, "ss", &src, &dest); in bus_machine_method_copy()
[all …]
/systemd-251/src/core/
Ddbus-service.c101 const char *dest, *src, *propagate_directory; in bus_service_method_mount() local
118 r = sd_bus_message_read(message, "ssbb", &src, &dest, &read_only, &make_file_or_directory); in bus_service_method_mount()
125 if (!is_image && isempty(dest)) in bus_service_method_mount()
126 dest = src; in bus_service_method_mount()
127 else if (!path_is_absolute(dest) || !path_is_normalized(dest)) in bus_service_method_mount()
157 if (path_startswith_strv(dest, c->inaccessible_paths)) in bus_service_method_mount()
158 …urn sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "%s is not accessible to this unit", dest); in bus_service_method_mount()
173 src, dest, read_only, make_file_or_directory, options); in bus_service_method_mount()
178 src, dest, read_only, make_file_or_directory); in bus_service_method_mount()
180 …n sd_bus_error_set_errnof(error, r, "Failed to mount %s on %s in unit's namespace: %m", src, dest); in bus_service_method_mount()
/systemd-251/src/network/tc/
Dcake.c317 int *dest, r; in config_parse_cake_tristate() local
336 dest = &c->autorate; in config_parse_cake_tristate()
338 dest = &c->raw; in config_parse_cake_tristate()
340 dest = &c->nat; in config_parse_cake_tristate()
342 dest = &c->wash; in config_parse_cake_tristate()
344 dest = &c->split_gso; in config_parse_cake_tristate()
349 *dest = -1; in config_parse_cake_tristate()
362 *dest = r; in config_parse_cake_tristate()
/systemd-251/src/udev/
Dudev-event.c240 char *dest, in udev_event_subst_format() argument
247 char *s = dest; in udev_event_subst_format()
415 if (s == dest) in udev_event_subst_format()
422 if (s == dest) in udev_event_subst_format()
448 return s - dest; in udev_event_subst_format()
461 char *dest, in udev_event_apply_format() argument
473 assert(dest); in udev_event_apply_format()
492 *dest++ = *s++; in udev_event_apply_format()
497 subst_len = udev_event_subst_format(event, type, attr, dest, size, &t); in udev_event_apply_format()
511 subst_len = udev_replace_whitespace(dest, dest, subst_len); in udev_event_apply_format()
[all …]
Dudev-node.c225 size_t udev_node_escape_path(const char *src, char *dest, size_t size) { in udev_node_escape_path() argument
230 assert(dest); in udev_node_escape_path()
237 memcpy(&dest[j], "\\x2f", 4); in udev_node_escape_path()
242 memcpy(&dest[j], "\\x5c", 4); in udev_node_escape_path()
247 dest[j] = src[i]; in udev_node_escape_path()
251 dest[j] = '\0'; in udev_node_escape_path()
261 dest[size - k - 2] = urlsafe_base64char((h >> (k * 6)) & 63); in udev_node_escape_path()
263 dest[size - 1] = '\0'; in udev_node_escape_path()
/systemd-251/src/network/generator/
Dnetwork-generator.c122 union in_addr_union *dest, union in_addr_union *gateway, Route **ret) { in route_new() argument
134 .dest = dest ? *dest : IN_ADDR_NULL, in route_new()
402 union in_addr_union *dest, union in_addr_union *gateway) { in network_set_route() argument
416 return route_new(network, family, prefixlen, dest, gateway, NULL); in network_set_route()
1063 … r = route_new(network, route->family, route->prefixlen, &route->dest, &route->gateway, NULL); in context_merge_networks()
1109 _cleanup_free_ char *dest = NULL, *gateway = NULL; in route_dump() local
1112 if (in_addr_is_set(route->family, &route->dest)) { in route_dump()
1113 r = in_addr_prefix_to_string(route->family, &route->dest, route->prefixlen, &dest); in route_dump()
1123 if (dest) in route_dump()
1124 fprintf(f, "Destination=%s\n", dest); in route_dump()
/systemd-251/src/network/
Dnetworkd-neighbor.c72 _cleanup_(neighbor_freep) Neighbor *dest = NULL; in neighbor_dup()
77 dest = newdup(Neighbor, neighbor, 1); in neighbor_dup()
78 if (!dest) in neighbor_dup()
82 dest->link = NULL; in neighbor_dup()
83 dest->network = NULL; in neighbor_dup()
84 dest->section = NULL; in neighbor_dup()
86 *ret = TAKE_PTR(dest); in neighbor_dup()

1234