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 Functions described here are available as a shared library, which can
47 be compiled against and linked to with the libsystemd pkg-config(1)
48 file.
49
50 The code described here uses getenv(3), which is declared to be not
51 multi-thread-safe. This means that the code calling the functions
52 described here must not call setenv(3) from a parallel thread. It is
53 recommended to only do calls to setenv() from an early phase of the
54 program when no other threads have been started.
55
57 systemd(1), sd-bus(3) sd_bus_slot_ref(3), sd_bus_slot_set_userdata(3)
58
59
60
61systemd 254 SD_BUS_SLOT_SET_DESCRIPTION(3)