1SD_BUS_SLOT_SET_DESCRIPTIONs(d3_)bus_slot_set_descripStDi_oBnUS_SLOT_SET_DESCRIPTION(3)
2
3
4
6 sd_bus_slot_set_description, sd_bus_slot_get_description - Set or query
7 the description of bus slot objects
8
10 #include <systemd/sd-bus.h>
11
12 int sd_bus_slot_set_description(sd_bus_slot* slot,
13 const char *description);
14
15 int sd_bus_slot_get_description(sd_bus_slot* bus,
16 const char **description);
17
19 sd_bus_slot_set_description() sets the description string that is used
20 in logging to the specified string. The string is copied internally and
21 freed when the bus slot object is deallocated. The description argument
22 may be NULL, in which case the description is unset.
23
24 sd_bus_slot_get_description() returns a description string in
25 description. If the string is not set, e.g. with
26 sd_bus_slot_set_description(), and the slot is a bus match callback
27 slot, the match string will be returned. Otherwise, -ENXIO is returned.
28
30 On success, these functions return 0 or a positive integer. On failure,
31 they return a negative errno-style error code.
32
33 Errors
34 Returned errors may indicate the following problems:
35
36 -EINVAL
37 An required argument is NULL.
38
39 -ENXIO
40 The bus slot object has no description.
41
42 -ENOMEM
43 Memory allocation failed.
44
46 These APIs are implemented as a shared library, which can be compiled
47 and linked to with the libsystemd pkg-config(1) file.
48
50 systemd(1), sd-bus(3) sd_bus_slot_ref(3), sd_bus_slot_set_userdata(3)
51
52
53
54systemd 245 SD_BUS_SLOT_SET_DESCRIPTION(3)