Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 693) sorted by relevance

12345678910>>...28

/systemd-251/src/shared/
Dspecifier.c37 …, size_t max_length, const Specifier table[], const char *root, const void *userdata, char **ret) { in specifier_printf() argument
44 assert(ret); in specifier_printf()
108 *ret = TAKE_PTR(result); in specifier_printf()
114 …fier_string(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_string() argument
117 assert(ret); in specifier_string()
125 *ret = n; in specifier_string()
129 …r_real_path(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_real_path() argument
132 assert(ret); in specifier_real_path()
137 return chase_symlinks(path, root, 0, ret, NULL); in specifier_real_path()
140 …l_directory(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_real_directory() argument
[all …]
Dclean-ipc.c41 int ret = 0, r; in clean_sysvipc_shm() local
89 ret = log_warning_errno(errno, in clean_sysvipc_shm()
94 if (ret == 0) in clean_sysvipc_shm()
95 ret = 1; in clean_sysvipc_shm()
99 return ret; in clean_sysvipc_shm()
105 int ret = 0, r; in clean_sysvipc_sem() local
148 ret = log_warning_errno(errno, in clean_sysvipc_sem()
153 if (ret == 0) in clean_sysvipc_sem()
154 ret = 1; in clean_sysvipc_sem()
158 return ret; in clean_sysvipc_sem()
[all …]
Dspecifier.h6 …ierCallback)(char specifier, const void *data, const char *root, const void *userdata, char **ret);
14 …t, size_t max_length, const Specifier table[], const char *root, const void *userdata, char **ret);
16 …ifier_string(char specifier, const void *data, const char *root, const void *userdata, char **ret);
17 …er_real_path(char specifier, const void *data, const char *root, const void *userdata, char **ret);
18 …al_directory(char specifier, const void *data, const char *root, const void *userdata, char **ret);
20 …r_machine_id(char specifier, const void *data, const char *root, const void *userdata, char **ret);
21 …fier_boot_id(char specifier, const void *data, const char *root, const void *userdata, char **ret);
22 …ier_hostname(char specifier, const void *data, const char *root, const void *userdata, char **ret);
23 …ort_hostname(char specifier, const void *data, const char *root, const void *userdata, char **ret);
24 …tty_hostname(char specifier, const void *data, const char *root, const void *userdata, char **ret);
[all …]
Dinstall-printf.c16 …nd_instance(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_prefix_and_instance() argument
31 *ret = ans; in specifier_prefix_and_instance()
33 *ret = TAKE_PTR(prefix); in specifier_prefix_and_instance()
38 …cifier_name(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_name() argument
43 return unit_name_replace_instance(i->name, i->default_instance, ret); in specifier_name()
48 *ret = ans; in specifier_name()
52 …fier_prefix(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_prefix() argument
55 return unit_name_to_prefix(i->name, ret); in specifier_prefix()
58 …er_instance(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_instance() argument
73 *ret = instance; in specifier_instance()
[all …]
Duserdb.c409 int r, ret = 0; in userdb_start_query() local
509 if (ret == 0 && r < 0) in userdb_start_query()
510 ret = r; in userdb_start_query()
514 …return ret < 0 ? ret : -ESRCH; /* propagate last error we saw if we couldn't connect to anything. … in userdb_start_query()
599 static int synthetic_root_user_build(UserRecord **ret) { in synthetic_root_user_build() argument
601 ret, in synthetic_root_user_build()
609 static int synthetic_nobody_user_build(UserRecord **ret) { in synthetic_nobody_user_build() argument
611 ret, in synthetic_nobody_user_build()
620 int userdb_by_name(const char *name, UserDBFlags flags, UserRecord **ret) { in userdb_by_name() argument
639 r = userdb_process(iterator, ret, NULL, NULL, NULL); in userdb_by_name()
[all …]
Defi-loader.c13 static int read_usec(const char *variable, usec_t *ret) { in read_usec() argument
19 assert(ret); in read_usec()
29 *ret = x; in read_usec()
61 int efi_loader_get_device_part_uuid(sd_id128_t *ret) { in efi_loader_get_device_part_uuid() argument
79 if (ret) in efi_loader_get_device_part_uuid()
81 ret->bytes[i] = parsed[i]; in efi_loader_get_device_part_uuid()
86 int efi_loader_get_entries(char ***ret) { in efi_loader_get_entries() argument
92 assert(ret); in efi_loader_get_entries()
135 *ret = TAKE_PTR(l); in efi_loader_get_entries()
139 int efi_loader_get_features(uint64_t *ret) { in efi_loader_get_features() argument
[all …]
/systemd-251/src/libsystemd/sd-path/
Dsd-path.c17 static int from_environment(const char *envname, const char *fallback, const char **ret) { in from_environment() argument
18 assert(ret); in from_environment()
25 *ret = e; in from_environment()
31 *ret = fallback; in from_environment()
38 static int from_home_dir(const char *envname, const char *suffix, char **buffer, const char **ret) { in from_home_dir() argument
44 assert(ret); in from_home_dir()
51 *ret = e; in from_home_dir()
64 *ret = TAKE_PTR(h); in from_home_dir()
68 static int from_user_dir(const char *field, char **buffer, const char **ret) { in from_user_dir() argument
78 assert(ret); in from_user_dir()
[all …]
/systemd-251/src/libsystemd-network/
Dndisc-router.c48 int sd_ndisc_router_get_timestamp(sd_ndisc_router *rt, clockid_t clock, uint64_t *ret) { in sd_ndisc_router_get_timestamp() argument
52 assert_return(ret, -EINVAL); in sd_ndisc_router_get_timestamp()
57 *ret = triple_timestamp_by_clock(&rt->timestamp, clock); in sd_ndisc_router_get_timestamp()
61 int sd_ndisc_router_get_raw(sd_ndisc_router *rt, const void **ret, size_t *size) { in sd_ndisc_router_get_raw() argument
63 assert_return(ret, -EINVAL); in sd_ndisc_router_get_raw()
66 *ret = NDISC_ROUTER_RAW(rt); in sd_ndisc_router_get_raw()
216 int sd_ndisc_router_get_hop_limit(sd_ndisc_router *rt, uint8_t *ret) { in sd_ndisc_router_get_hop_limit() argument
218 assert_return(ret, -EINVAL); in sd_ndisc_router_get_hop_limit()
220 *ret = rt->hop_limit; in sd_ndisc_router_get_hop_limit()
240 int sd_ndisc_router_get_preference(sd_ndisc_router *rt, unsigned *ret) { in sd_ndisc_router_get_preference() argument
[all …]
Dlldp-neighbor.c380 int sd_lldp_neighbor_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size) { in sd_lldp_neighbor_get_raw() argument
382 assert_return(ret, -EINVAL); in sd_lldp_neighbor_get_raw()
385 *ret = LLDP_NEIGHBOR_RAW(n); in sd_lldp_neighbor_get_raw()
391 int sd_lldp_neighbor_get_chassis_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *s… in sd_lldp_neighbor_get_chassis_id() argument
394 assert_return(ret, -EINVAL); in sd_lldp_neighbor_get_chassis_id()
400 *ret = (uint8_t*) n->id.chassis_id + 1; in sd_lldp_neighbor_get_chassis_id()
406 static int format_mac_address(const void *data, size_t sz, char **ret) { in format_mac_address() argument
421 *ret = ether_addr_to_string(&a, k); in format_mac_address()
425 static int format_network_address(const void *data, size_t sz, char **ret) { in format_network_address() argument
438 r = in_addr_to_string(family, &a, ret); in format_network_address()
[all …]
/systemd-251/src/core/
Dunit-printf.c15 …nd_instance(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_prefix_and_instance() argument
18 return unit_name_to_prefix_and_instance(u->id, ret); in specifier_prefix_and_instance()
21 …fier_prefix(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_prefix() argument
24 return unit_name_to_prefix(u->id, ret); in specifier_prefix()
27 …x_unescaped(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_prefix_unescaped() argument
36 return unit_name_unescape(p, ret); in specifier_prefix_unescaped()
39 …e_unescaped(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_instance_unescaped() argument
42 return unit_name_unescape(strempty(u->instance), ret); in specifier_instance_unescaped()
45 …t_component(char specifier, const void *data, const char *root, const void *userdata, char **ret) { in specifier_last_component() argument
57 return specifier_string(specifier, dash + 1, root, userdata, ret); in specifier_last_component()
[all …]
Dunit-printf.h10 int unit_name_printf(const Unit *u, const char* text, char **ret);
11 int unit_full_printf_full(const Unit *u, const char *text, size_t max_length, char **ret);
12 static inline int unit_full_printf(const Unit *u, const char *text, char **ret) { in unit_full_printf() argument
13 return unit_full_printf_full(u, text, LONG_LINE_MAX, ret); in unit_full_printf()
15 static inline int unit_path_printf(const Unit *u, const char *text, char **ret) { in unit_path_printf() argument
16 return unit_full_printf_full(u, text, PATH_MAX-1, ret); in unit_path_printf()
18 static inline int unit_fd_printf(const Unit *u, const char *text, char **ret) { in unit_fd_printf() argument
19 return unit_full_printf_full(u, text, FDNAME_MAX, ret); in unit_fd_printf()
21 static inline int unit_cred_printf(const Unit *u, const char *text, char **ret) { in unit_cred_printf() argument
22 return unit_full_printf_full(u, text, CREDENTIAL_NAME_MAX, ret); in unit_cred_printf()
[all …]
/systemd-251/src/libsystemd/sd-network/
Dsd-network.c21 static int network_get_string(const char *field, char **ret) { in network_get_string() argument
25 assert_return(ret, -EINVAL); in network_get_string()
35 *ret = TAKE_PTR(s); in network_get_string()
64 static int network_get_strv(const char *key, char ***ret) { in network_get_strv() argument
69 assert_return(ret, -EINVAL); in network_get_strv()
77 *ret = NULL; in network_get_strv()
88 *ret = TAKE_PTR(a); in network_get_strv()
93 int sd_network_get_dns(char ***ret) { in sd_network_get_dns() argument
94 return network_get_strv("DNS", ret); in sd_network_get_dns()
97 int sd_network_get_ntp(char ***ret) { in sd_network_get_ntp() argument
[all …]
/systemd-251/src/basic/
Dunit-name.c127 int unit_name_to_prefix(const char *n, char **ret) { in unit_name_to_prefix() argument
132 assert(ret); in unit_name_to_prefix()
147 *ret = s; in unit_name_to_prefix()
151 UnitNameFlags unit_name_to_instance(const char *n, char **ret) { in unit_name_to_instance() argument
162 if (ret) in unit_name_to_instance()
163 *ret = NULL; in unit_name_to_instance()
173 if (ret) { in unit_name_to_instance()
178 *ret = i; in unit_name_to_instance()
183 int unit_name_to_prefix_and_instance(const char *n, char **ret) { in unit_name_to_prefix_and_instance() argument
188 assert(ret); in unit_name_to_prefix_and_instance()
[all …]
Dunit-name.h24 int unit_name_to_prefix(const char *n, char **ret);
25 UnitNameFlags unit_name_to_instance(const char *n, char **ret);
29 int unit_name_to_prefix_and_instance(const char *n, char **ret);
33 int unit_name_change_suffix(const char *n, const char *suffix, char **ret);
35 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret);
36 int unit_name_build_from_type(const char *prefix, const char *instance, UnitType, char **ret);
39 int unit_name_unescape(const char *f, char **ret);
40 int unit_name_path_escape(const char *f, char **ret);
41 int unit_name_path_unescape(const char *f, char **ret);
43 int unit_name_replace_instance(const char *f, const char *i, char **ret);
[all …]
Dxattr-util.h10 int getxattr_at_malloc(int fd, const char *path, const char *name, int flags, char **ret);
11 static inline int getxattr_malloc(const char *path, const char *name, char **ret) { in getxattr_malloc() argument
12 return getxattr_at_malloc(AT_FDCWD, path, name, AT_SYMLINK_FOLLOW, ret); in getxattr_malloc()
14 static inline int lgetxattr_malloc(const char *path, const char *name, char **ret) { in lgetxattr_malloc() argument
15 return getxattr_at_malloc(AT_FDCWD, path, name, 0, ret); in lgetxattr_malloc()
17 static inline int fgetxattr_malloc(int fd, const char *name, char **ret) { in fgetxattr_malloc() argument
18 return getxattr_at_malloc(fd, NULL, name, AT_EMPTY_PATH, ret); in fgetxattr_malloc()
23 int fd_getcrtime_at(int fd, const char *name, int flags, usec_t *ret);
24 static inline int fd_getcrtime(int fd, usec_t *ret) { in fd_getcrtime() argument
25 return fd_getcrtime_at(fd, NULL, 0, ret); in fd_getcrtime()
[all …]
Drlimit-util.c78 static int rlimit_parse_u64(const char *val, rlim_t *ret) { in rlimit_parse_u64() argument
83 assert(ret); in rlimit_parse_u64()
86 *ret = RLIM_INFINITY; in rlimit_parse_u64()
99 *ret = (rlim_t) u; in rlimit_parse_u64()
103 static int rlimit_parse_size(const char *val, rlim_t *ret) { in rlimit_parse_size() argument
108 assert(ret); in rlimit_parse_size()
111 *ret = RLIM_INFINITY; in rlimit_parse_size()
121 *ret = (rlim_t) u; in rlimit_parse_size()
125 static int rlimit_parse_sec(const char *val, rlim_t *ret) { in rlimit_parse_sec() argument
131 assert(ret); in rlimit_parse_sec()
[all …]
Dprocess-util.c88 int get_process_comm(pid_t pid, char **ret) { in get_process_comm() argument
92 assert(ret); in get_process_comm()
122 *ret = TAKE_PTR(escaped); in get_process_comm()
130 char **ret, in get_process_cmdline_nulstr() argument
180 *ret = t; in get_process_cmdline_nulstr()
185 int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags, char **ret) { in get_process_cmdline() argument
191 assert(ret); in get_process_cmdline()
252 *ret = ans; in get_process_cmdline()
459 int get_process_capeff(pid_t pid, char **ret) { in get_process_capeff() argument
464 assert(ret); in get_process_capeff()
[all …]
/systemd-251/src/libsystemd/sd-id128/
Dsd-id128.c56 _public_ int sd_id128_from_string(const char s[], sd_id128_t *ret) { in sd_id128_from_string() argument
99 if (ret) in sd_id128_from_string()
100 *ret = t; in sd_id128_from_string()
104 _public_ int sd_id128_get_machine(sd_id128_t *ret) { in sd_id128_get_machine() argument
108 assert_return(ret, -EINVAL); in sd_id128_get_machine()
119 *ret = saved_machine_id; in sd_id128_get_machine()
123 _public_ int sd_id128_get_boot(sd_id128_t *ret) { in sd_id128_get_boot() argument
127 assert_return(ret, -EINVAL); in sd_id128_get_boot()
135 *ret = saved_boot_id; in sd_id128_get_boot()
139 static int get_invocation_from_keyring(sd_id128_t *ret) { in get_invocation_from_keyring() argument
[all …]
/systemd-251/src/network/
Dnetworkd-json.c22 static int address_build_json(Address *address, JsonVariant **ret) { in address_build_json() argument
28 assert(ret); in address_build_json()
61 *ret = TAKE_PTR(v); in address_build_json()
65 static int addresses_build_json(Set *addresses, JsonVariant **ret) { in addresses_build_json() argument
71 assert(ret); in addresses_build_json()
74 *ret = NULL; in addresses_build_json()
89 …r = json_build(ret, JSON_BUILD_OBJECT(JSON_BUILD_PAIR("Addresses", JSON_BUILD_VARIANT_ARRAY(elemen… in addresses_build_json()
97 static int neighbor_build_json(Neighbor *n, JsonVariant **ret) { in neighbor_build_json() argument
103 assert(ret); in neighbor_build_json()
118 *ret = TAKE_PTR(v); in neighbor_build_json()
[all …]
/systemd-251/src/systemd/
Dsd-device.h60 int sd_device_new_from_syspath(sd_device **ret, const char *syspath);
61 int sd_device_new_from_devnum(sd_device **ret, char type, dev_t devnum);
62 int sd_device_new_from_subsystem_sysname(sd_device **ret, const char *subsystem, const char *sysnam…
63 int sd_device_new_from_device_id(sd_device **ret, const char *id);
64 int sd_device_new_from_stat_rdev(sd_device **ret, const struct stat *st);
65 int sd_device_new_from_devname(sd_device **ret, const char *devname);
66 int sd_device_new_from_path(sd_device **ret, const char *path);
67 int sd_device_new_from_ifname(sd_device **ret, const char *ifname);
68 int sd_device_new_from_ifindex(sd_device **ret, int ifindex);
70 int sd_device_get_parent(sd_device *child, sd_device **ret);
[all …]
Dsd-ndisc.h68 int sd_ndisc_new(sd_ndisc **ret);
82 int sd_ndisc_get_ifname(sd_ndisc *nd, const char **ret);
89 int sd_ndisc_router_get_timestamp(sd_ndisc_router *rt, clockid_t clock, uint64_t *ret);
90 int sd_ndisc_router_get_raw(sd_ndisc_router *rt, const void **ret, size_t *size);
92 int sd_ndisc_router_get_hop_limit(sd_ndisc_router *rt, uint8_t *ret);
94 int sd_ndisc_router_get_preference(sd_ndisc_router *rt, unsigned *ret);
96 int sd_ndisc_router_get_mtu(sd_ndisc_router *rt, uint32_t *ret);
101 int sd_ndisc_router_option_get_type(sd_ndisc_router *rt, uint8_t *ret);
103 int sd_ndisc_router_option_get_raw(sd_ndisc_router *rt, const void **ret, size_t *size);
106 int sd_ndisc_router_prefix_get_valid_lifetime(sd_ndisc_router *rt, uint32_t *ret);
[all …]
/systemd-251/src/test/
Dtest-dns-domain.c9 …_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret, int ret_ldh) { in test_dns_label_unescape_one() argument
14 log_info("%s, %s, %zu, →%d/%d", what, expect, buffer_sz, ret, ret_ldh); in test_dns_label_unescape_one()
17 assert_se(r == ret); in test_dns_label_unescape_one()
29 const int ret_noe = strchr(what, '\\') ? -EINVAL : ret; in test_dns_label_unescape_one()
60 …test_dns_name_to_wire_format_one(const char *what, const char *expect, size_t buffer_sz, int ret) { in test_dns_name_to_wire_format_one() argument
64 log_info("%s, %s, %zu, →%d", what, expect, buffer_sz, ret); in test_dns_name_to_wire_format_one()
67 assert_se(r == ret); in test_dns_name_to_wire_format_one()
164 static void test_dns_label_escape_one(const char *what, size_t l, const char *expect, int ret) { in test_dns_label_escape_one() argument
168 log_info("%s, %zu, %s, →%d", what, l, expect, ret); in test_dns_label_escape_one()
171 assert_se(r == ret); in test_dns_label_escape_one()
[all …]
/systemd-251/src/udev/ata_id/
Data_id.c58 int ret; in disk_scsi_inquiry_command() local
60 ret = ioctl(fd, SG_IO, &io_v4); in disk_scsi_inquiry_command()
61 if (ret != 0) { in disk_scsi_inquiry_command()
76 ret = ioctl(fd, SG_IO, &io_hdr); in disk_scsi_inquiry_command()
77 if (ret != 0) in disk_scsi_inquiry_command()
78 return ret; in disk_scsi_inquiry_command()
88 return ret; in disk_scsi_inquiry_command()
140 int ret; in disk_identify_command() local
142 ret = ioctl(fd, SG_IO, &io_v4); in disk_identify_command()
143 if (ret != 0) { in disk_identify_command()
[all …]
/systemd-251/src/libsystemd/sd-netlink/
Dnetlink-message-nfnl.c18 static int nft_message_new(sd_netlink *nfnl, sd_netlink_message **ret, int family, uint16_t msg_typ… in nft_message_new() argument
23 assert_return(ret, -EINVAL); in nft_message_new()
37 *ret = TAKE_PTR(m); in nft_message_new()
41 static int nfnl_message_batch(sd_netlink *nfnl, sd_netlink_message **ret, uint16_t msg_type) { in nfnl_message_batch() argument
55 *ret = TAKE_PTR(m); in nfnl_message_batch()
59 int sd_nfnl_message_batch_begin(sd_netlink *nfnl, sd_netlink_message **ret) { in sd_nfnl_message_batch_begin() argument
60 return nfnl_message_batch(nfnl, ret, NFNL_MSG_BATCH_BEGIN); in sd_nfnl_message_batch_begin()
63 int sd_nfnl_message_batch_end(sd_netlink *nfnl, sd_netlink_message **ret) { in sd_nfnl_message_batch_end() argument
64 return nfnl_message_batch(nfnl, ret, NFNL_MSG_BATCH_END); in sd_nfnl_message_batch_end()
69 sd_netlink_message **ret, in sd_nfnl_nft_message_new_basechain() argument
[all …]
Dnetlink-genl.c97 const GenericNetlinkFamily **ret) { in genl_family_new() argument
108 assert(ret); in genl_family_new()
204 *ret = TAKE_PTR(f); in genl_family_new()
221 sd_netlink_message **ret) { in genl_message_new() argument
230 assert(ret); in genl_message_new()
246 *ret = TAKE_PTR(m); in genl_message_new()
254 const GenericNetlinkFamily **ret) { in genl_family_get_by_name_internal() argument
264 assert(ret); in genl_family_get_by_name_internal()
283 return genl_family_new(nl, name, type_system, reply, ret); in genl_family_get_by_name_internal()
286 …c int genl_family_get_by_name(sd_netlink *nl, const char *name, const GenericNetlinkFamily **ret) { in genl_family_get_by_name() argument
[all …]

12345678910>>...28