Home
last modified time | relevance | path

Searched refs:v (Results 1 – 25 of 318) sorted by relevance

12345678910>>...13

/systemd-251/src/shared/
Dvarlink.c211 #define varlink_log_errno(v, error, fmt, ...) \ argument
212 log_debug_errno(error, "%s: " fmt, varlink_description(v), ##__VA_ARGS__)
214 #define varlink_log(v, fmt, ...) \ argument
215 log_debug("%s: " fmt, varlink_description(v), ##__VA_ARGS__)
223 static inline const char *varlink_description(Varlink *v) { in varlink_description() argument
224 return (v ? v->description : NULL) ?: "varlink"; in varlink_description()
231 static void varlink_set_state(Varlink *v, VarlinkState state) { in varlink_set_state() argument
232 assert(v); in varlink_set_state()
235 if (v->state < 0) in varlink_set_state()
236 varlink_log(v, "Setting state %s", in varlink_set_state()
[all …]
Djson.h81 JsonVariant *json_variant_ref(JsonVariant *v);
82 JsonVariant *json_variant_unref(JsonVariant *v);
85 #define JSON_VARIANT_REPLACE(v, q) \ argument
87 typeof(v)* _v = &(v); \
95 const char *json_variant_string(JsonVariant *v);
96 int64_t json_variant_integer(JsonVariant *v);
97 uint64_t json_variant_unsigned(JsonVariant *v);
98 double json_variant_real(JsonVariant *v);
99 bool json_variant_boolean(JsonVariant *v);
101 JsonVariantType json_variant_type(JsonVariant *v);
[all …]
Djson.c177 static bool json_variant_is_magic(const JsonVariant *v) { in json_variant_is_magic() argument
178 if (!v) in json_variant_is_magic()
181 return v < _JSON_VARIANT_MAGIC_MAX; in json_variant_is_magic()
184 static bool json_variant_is_const_string(const JsonVariant *v) { in json_variant_is_const_string() argument
186 if (v < _JSON_VARIANT_MAGIC_MAX) in json_variant_is_const_string()
192 return (((uintptr_t) v) & 1) != 0; in json_variant_is_const_string()
195 static bool json_variant_is_regular(const JsonVariant *v) { in json_variant_is_regular() argument
197 if (v < _JSON_VARIANT_MAGIC_MAX) in json_variant_is_regular()
200 return (((uintptr_t) v) & 1) == 0; in json_variant_is_regular()
203 static JsonVariant *json_variant_dereference(JsonVariant *v) { in json_variant_dereference() argument
[all …]
Dvarlink.h61 Varlink* varlink_unref(Varlink *v);
63 int varlink_get_fd(Varlink *v);
64 int varlink_get_events(Varlink *v);
65 int varlink_get_timeout(Varlink *v, usec_t *ret);
67 int varlink_attach_event(Varlink *v, sd_event *e, int64_t priority);
68 void varlink_detach_event(Varlink *v);
69 sd_event *varlink_get_event(Varlink *v);
71 int varlink_process(Varlink *v);
72 int varlink_wait(Varlink *v, usec_t timeout);
74 int varlink_flush(Varlink *v);
[all …]
Dfind-esp.c37 const char *v; in verify_esp_blkid() local
63 r = blkid_probe_lookup_value(b, "TYPE", &v, NULL); in verify_esp_blkid()
68 if (!streq(v, "vfat")) in verify_esp_blkid()
73 r = blkid_probe_lookup_value(b, "PART_ENTRY_SCHEME", &v, NULL); in verify_esp_blkid()
78 if (!streq(v, "gpt")) in verify_esp_blkid()
84 r = blkid_probe_lookup_value(b, "PART_ENTRY_TYPE", &v, NULL); in verify_esp_blkid()
87 if (id128_equal_string(v, GPT_ESP) <= 0) in verify_esp_blkid()
93 r = blkid_probe_lookup_value(b, "PART_ENTRY_UUID", &v, NULL); in verify_esp_blkid()
96 r = sd_id128_from_string(v, &uuid); in verify_esp_blkid()
98 return log_error_errno(r, "Partition \"%s\" has invalid UUID \"%s\".", node, v); in verify_esp_blkid()
[all …]
/systemd-251/hwdb.d/
D20-pci-classes.hwdb5 pci:v*d*sv*sd*bc00*
8 pci:v*d*sv*sd*bc00sc00*
11 pci:v*d*sv*sd*bc00sc01*
14 pci:v*d*sv*sd*bc00sc05*
17 pci:v*d*sv*sd*bc01*
20 pci:v*d*sv*sd*bc01sc00*
23 pci:v*d*sv*sd*bc01sc01*
26 pci:v*d*sv*sd*bc01sc01i00*
29 pci:v*d*sv*sd*bc01sc01i05*
32 pci:v*d*sv*sd*bc01sc01i0A*
[all …]
D20-usb-classes.hwdb5 usb:v*p*d*dc01*
8 usb:v*p*d*dc01dsc01*
11 usb:v*p*d*dc01dsc02*
14 usb:v*p*d*dc01dsc03*
17 usb:v*p*d*dc02*
20 usb:v*p*d*dc02dsc01*
23 usb:v*p*d*dc02dsc02*
26 usb:v*p*d*dc02dsc02dp01*
27 ID_USB_PROTOCOL_FROM_DATABASE=AT-commands (v.25ter)
29 usb:v*p*d*dc02dsc02dp02*
[all …]
/systemd-251/src/network/netdev/
Dvxlan.c25 static int vxlan_get_local_address(VxLan *v, Link *link, int *ret_family, union in_addr_union *ret_… in vxlan_get_local_address() argument
26 assert(v); in vxlan_get_local_address()
28 if (v->local_type < 0) { in vxlan_get_local_address()
30 *ret_family = v->local_family; in vxlan_get_local_address()
32 *ret_address = v->local; in vxlan_get_local_address()
36 … return link_get_local_address(link, v->local_type, v->local_family, ret_family, ret_address); in vxlan_get_local_address()
42 VxLan *v; in netdev_vxlan_fill_message_create() local
47 v = VXLAN(netdev); in netdev_vxlan_fill_message_create()
49 assert(v); in netdev_vxlan_fill_message_create()
51 if (v->vni <= VXLAN_VID_MAX) { in netdev_vxlan_fill_message_create()
[all …]
Dgeneve.c31 Geneve *v; in netdev_geneve_fill_message_create() local
37 v = GENEVE(netdev); in netdev_geneve_fill_message_create()
39 if (v->id <= GENEVE_VID_MAX) { in netdev_geneve_fill_message_create()
40 r = sd_netlink_message_append_u32(m, IFLA_GENEVE_ID, v->id); in netdev_geneve_fill_message_create()
45 if (in_addr_is_set(v->remote_family, &v->remote)) { in netdev_geneve_fill_message_create()
46 if (v->remote_family == AF_INET) in netdev_geneve_fill_message_create()
47 r = sd_netlink_message_append_in_addr(m, IFLA_GENEVE_REMOTE, &v->remote.in); in netdev_geneve_fill_message_create()
49 … r = sd_netlink_message_append_in6_addr(m, IFLA_GENEVE_REMOTE6, &v->remote.in6); in netdev_geneve_fill_message_create()
54 if (v->inherit) { in netdev_geneve_fill_message_create()
59 r = sd_netlink_message_append_u8(m, IFLA_GENEVE_TTL, v->ttl); in netdev_geneve_fill_message_create()
[all …]
Dvlan.c14 VLan *v; in netdev_vlan_fill_message_create() local
21 v = VLAN(netdev); in netdev_vlan_fill_message_create()
23 assert(v); in netdev_vlan_fill_message_create()
25 r = sd_netlink_message_append_u16(req, IFLA_VLAN_ID, v->id); in netdev_vlan_fill_message_create()
29 if (v->protocol >= 0) { in netdev_vlan_fill_message_create()
30 r = sd_netlink_message_append_u16(req, IFLA_VLAN_PROTOCOL, htobe16(v->protocol)); in netdev_vlan_fill_message_create()
35 if (v->gvrp != -1) { in netdev_vlan_fill_message_create()
37 SET_FLAG(flags.flags, VLAN_FLAG_GVRP, v->gvrp); in netdev_vlan_fill_message_create()
40 if (v->mvrp != -1) { in netdev_vlan_fill_message_create()
42 SET_FLAG(flags.flags, VLAN_FLAG_MVRP, v->mvrp); in netdev_vlan_fill_message_create()
[all …]
Dveth.c14 Veth *v; in netdev_veth_fill_message_create() local
21 v = VETH(netdev); in netdev_veth_fill_message_create()
23 assert(v); in netdev_veth_fill_message_create()
29 if (v->ifname_peer) { in netdev_veth_fill_message_create()
30 r = sd_netlink_message_append_string(m, IFLA_IFNAME, v->ifname_peer); in netdev_veth_fill_message_create()
35 r = netdev_generate_hw_addr(netdev, NULL, v->ifname_peer, &v->hw_addr_peer, &hw_addr); in netdev_veth_fill_message_create()
60 Veth *v; in netdev_veth_verify() local
65 v = VETH(netdev); in netdev_veth_verify()
67 assert(v); in netdev_veth_verify()
69 if (!v->ifname_peer) in netdev_veth_verify()
[all …]
Dvxcan.c9 VxCan *v; in netdev_vxcan_fill_message_create() local
16 v = VXCAN(netdev); in netdev_vxcan_fill_message_create()
18 assert(v); in netdev_vxcan_fill_message_create()
24 if (v->ifname_peer) { in netdev_vxcan_fill_message_create()
25 r = sd_netlink_message_append_string(m, IFLA_IFNAME, v->ifname_peer); in netdev_vxcan_fill_message_create()
38 VxCan *v; in netdev_vxcan_verify() local
43 v = VXCAN(netdev); in netdev_vxcan_verify()
45 assert(v); in netdev_vxcan_verify()
47 if (!v->ifname_peer) in netdev_vxcan_verify()
55 VxCan *v; in vxcan_done() local
[all …]
/systemd-251/src/test/
Dtest-json.c31 JsonValue v = JSON_VALUE_NULL; in test_tokenizer_one() local
34 … t = json_tokenize(&data, &str, &v, &token_line, &token_column, &state, &line, &column); in test_tokenizer_one()
53 assert_se(fabsl(d - v.real) < 1e-10 || in test_tokenizer_one()
54 fabsl((d - v.real) / v.real) < 1e-10); in test_tokenizer_one()
60 assert_se(i == v.integer); in test_tokenizer_one()
66 assert_se(u == v.unsig); in test_tokenizer_one()
72 assert_se(b == v.boolean); in test_tokenizer_one()
82 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *w = NULL; in test_variant_one()
90 r = json_parse(data, 0, &v, NULL, NULL); in test_variant_one()
92 assert_se(v); in test_variant_one()
[all …]
Dtest-procfs-util.c14 uint64_t v, pid_max, threads_max, limit; in main() local
23 assert_se(procfs_memory_get_used(&v) >= 0); in main()
24 log_info("Current memory usage: %s", FORMAT_BYTES(v)); in main()
26 assert_se(procfs_tasks_get_current(&v) >= 0); in main()
27 log_info("Current number of tasks: %" PRIu64, v); in main()
60 assert_se(procfs_get_pid_max(&v) >= 0); in main()
62 assert_se(v == pid_max); in main()
64 assert_se(procfs_get_threads_max(&v) >= 0); in main()
65 assert_se(v == limit-1); in main()
69 assert_se(procfs_get_pid_max(&v) >= 0); in main()
[all …]
/systemd-251/src/fuzz/
Dfuzz-json.c13 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in LLVMFuzzerTestOneInput()
23 r = json_parse_file(f, NULL, 0, &v, NULL, NULL); in LLVMFuzzerTestOneInput()
32 json_variant_dump(v, 0, g ?: stdout, NULL); in LLVMFuzzerTestOneInput()
33 … json_variant_dump(v, JSON_FORMAT_PRETTY|JSON_FORMAT_COLOR|JSON_FORMAT_SOURCE, g ?: stdout, NULL); in LLVMFuzzerTestOneInput()
35 bool sorted = json_variant_is_sorted(v); in LLVMFuzzerTestOneInput()
38 r = json_variant_sort(&v); in LLVMFuzzerTestOneInput()
41 sorted = json_variant_is_sorted(v); in LLVMFuzzerTestOneInput()
45 bool normalized = json_variant_is_normalized(v); in LLVMFuzzerTestOneInput()
48 r = json_variant_normalize(&v); in LLVMFuzzerTestOneInput()
51 normalized = json_variant_is_normalized(v); in LLVMFuzzerTestOneInput()
[all …]
/systemd-251/src/basic/
Dpercent-util.c9 int r, v; in parse_parts_value_whole() local
16 r = safe_atoi(n, &v); in parse_parts_value_whole()
19 if (v < 0) in parse_parts_value_whole()
22 return v; in parse_parts_value_whole()
27 int r, q, v; in parse_parts_value_with_tenths_place() local
45 r = safe_atoi(n, &v); in parse_parts_value_with_tenths_place()
48 if (v < 0) in parse_parts_value_with_tenths_place()
50 if (v > (INT_MAX - q) / 10) in parse_parts_value_with_tenths_place()
53 v = v * 10 + q; in parse_parts_value_with_tenths_place()
54 return v; in parse_parts_value_with_tenths_place()
[all …]
Dvirt.c432 Virtualization v, dmi; in detect_vm() local
451 v = dmi; in detect_vm()
456 v = detect_vm_uml(); in detect_vm()
457 if (v < 0) in detect_vm()
458 return v; in detect_vm()
459 if (v != VIRTUALIZATION_NONE) in detect_vm()
463 v = detect_vm_xen(); in detect_vm()
464 if (v < 0) in detect_vm()
465 return v; in detect_vm()
466 if (v == VIRTUALIZATION_XEN) { in detect_vm()
[all …]
Dxattr-util.c74 _cleanup_free_ char *v = NULL; in getxattr_at_malloc() local
81 v = new0(char, l+1); in getxattr_at_malloc()
82 if (!v) in getxattr_at_malloc()
85 l = MALLOC_ELEMENTSOF(v) - 1; in getxattr_at_malloc()
88 …n = FLAGS_SET(flags, AT_SYMLINK_FOLLOW) ? getxattr(path, name, v, l) : lgetxattr(path, name, v, l); in getxattr_at_malloc()
90 … n = by_procfs ? getxattr(FORMAT_PROC_FD_PATH(fd), name, v, l) : fgetxattr(fd, name, v, l); in getxattr_at_malloc()
103 v[n] = 0; /* NUL terminate */ in getxattr_at_malloc()
104 *ret = TAKE_PTR(v); in getxattr_at_malloc()
250 _cleanup_free_ char *v = NULL; in listxattr_at_malloc() local
257 v = new(char, l+1); in listxattr_at_malloc()
[all …]
/systemd-251/src/nspawn/
Dnspawn-oci.c81 static int oci_unexpected(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata… in oci_unexpected() argument
82 return json_log(v, flags, SYNTHETIC_ERRNO(EINVAL), in oci_unexpected()
83 …expected OCI element '%s' of type '%s'.", name, json_variant_type_to_string(json_variant_type(v))); in oci_unexpected()
86 static int oci_unsupported(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdat… in oci_unsupported() argument
87 return json_log(v, flags, SYNTHETIC_ERRNO(EOPNOTSUPP), in oci_unsupported()
88 …upported OCI element '%s' of type '%s'.", name, json_variant_type_to_string(json_variant_type(v))); in oci_unsupported()
91 static int oci_terminal(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) { in oci_terminal() argument
96 s->console_mode = json_variant_boolean(v) ? _CONSOLE_MODE_INVALID : CONSOLE_PIPE; in oci_terminal()
118 static int oci_console_size(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userda… in oci_console_size() argument
126 return json_dispatch(v, table, oci_unexpected, flags, userdata); in oci_console_size()
[all …]
/systemd-251/src/core/
Ddbus-util.h20 type v; \
25 r = sd_bus_message_read(message, bus_type, &v); \
30 *p = (cast_type) v; \
32 "%s=" fmt, name, v); \
47 type v; \
52 r = sd_bus_message_read(message, bus_type, &v); \
56 if (!check(v)) \
58 "Invalid %s setting: " fmt, name, v); \
61 *p = (cast_type) v; \
63 "%s=" fmt, name, v); \
[all …]
Dunit-serialize.c194 uint64_t v; in unit_serialize() local
196 r = unit_get_ip_accounting(u, m, &v); in unit_serialize()
198 … (void) serialize_item_format(f, ip_accounting_metric_field[m], "%" PRIu64, v); in unit_serialize()
241 #define MATCH_DESERIALIZE(key, l, v, parse_func, target) \ argument
245 int _deserialize_r = parse_func(v); \
248 … "Failed to parse \"%s=%s\", ignoring.", l, v); \
255 #define MATCH_DESERIALIZE_IMMEDIATE(key, l, v, parse_func, target) \ argument
259 int _deserialize_r = parse_func(v, &target); \
262 "Failed to parse \"%s=%s\", ignoring", l, v); \
276 char *l, *v; in unit_deserialize() local
[all …]
Dcore-varlink.c90 _cleanup_(json_variant_unrefp) JsonVariant *arr = NULL, *v = NULL; in manager_varlink_send_managed_oom_update()
132 r = json_build(&v, JSON_BUILD_OBJECT(JSON_BUILD_PAIR("cgroups", JSON_BUILD_VARIANT(arr)))); in manager_varlink_send_managed_oom_update()
139 r = varlink_notify(u->manager->managed_oom_varlink, v); in manager_varlink_send_managed_oom_update()
143 … r = varlink_send(u->manager->managed_oom_varlink, "io.systemd.oom.ReportManagedOOMCGroups", v); in manager_varlink_send_managed_oom_update()
150 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *arr = NULL; in build_managed_oom_cgroups_json()
190 r = json_build(&v, JSON_BUILD_OBJECT(JSON_BUILD_PAIR("cgroups", JSON_BUILD_VARIANT(arr)))); in build_managed_oom_cgroups_json()
194 *ret = TAKE_PTR(v); in build_managed_oom_cgroups_json()
204 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in vl_method_subscribe_managed_oom_cgroups()
219 r = build_managed_oom_cgroups_json(m, &v); in vl_method_subscribe_managed_oom_cgroups()
224 return varlink_reply(link, v); in vl_method_subscribe_managed_oom_cgroups()
[all …]
/systemd-251/src/libsystemd/sd-bus/
Dbus-introspect.c193 const sd_bus_vtable *v) { in introspect_write_interface() argument
195 const sd_bus_vtable *vtable = v; in introspect_write_interface()
201 assert(v); in introspect_write_interface()
207 for (; v->type != _SD_BUS_VTABLE_END; v = bus_vtable_next(vtable, v)) { in introspect_write_interface()
213 if (v->type != _SD_BUS_VTABLE_START && (v->flags & SD_BUS_VTABLE_HIDDEN)) in introspect_write_interface()
216 switch (v->type) { in introspect_write_interface()
219 if (v->flags & SD_BUS_VTABLE_DEPRECATED) in introspect_write_interface()
224 fprintf(i->f, " <method name=\"%s\">\n", v->x.method.member); in introspect_write_interface()
226 names = strempty(v->x.method.names); in introspect_write_interface()
227 … introspect_write_arguments(i, strempty(v->x.method.signature), &names, "in"); in introspect_write_interface()
[all …]
Dbus-objects.c425 const sd_bus_vtable *v, in invoke_property_get() argument
438 assert(v); in invoke_property_get()
444 if (v->x.property.get) { in invoke_property_get()
448 r = v->x.property.get(bus, path, interface, property, reply, userdata, error); in invoke_property_get()
461 if (streq(v->x.property.signature, "as")) in invoke_property_get()
464 assert(signature_is_single(v->x.property.signature, false)); in invoke_property_get()
465 assert(bus_type_is_basic(v->x.property.signature[0])); in invoke_property_get()
467 switch (v->x.property.signature[0]) { in invoke_property_get()
484 return sd_bus_message_append_basic(reply, v->x.property.signature[0], p); in invoke_property_get()
490 const sd_bus_vtable *v, in invoke_property_set() argument
[all …]
/systemd-251/src/home/
Dhomectl-recovery-key.c14 static int add_privileged(JsonVariant **v, const char *hashed) { in add_privileged() argument
18 assert(v); in add_privileged()
29 w = json_variant_ref(json_variant_by_key(*v, "privileged")); in add_privileged()
40 r = json_variant_set_field(v, "privileged", w); in add_privileged()
47 static int add_public(JsonVariant **v) { in add_public() argument
51 assert(v); in add_public()
53 r = json_variant_strv(json_variant_by_key(*v, "recoveryKeyType"), &types); in add_public()
61 r = json_variant_set_field_strv(v, "recoveryKeyType", types); in add_public()
68 static int add_secret(JsonVariant **v, const char *password) { in add_secret() argument
73 assert(v); in add_secret()
[all …]

12345678910>>...13