Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_slot_set_description.3

raw
1 '\" t
2 .TH "SD_BUS_SLOT_SET_DESCRIPTION" "3" "" "systemd 261~rc3" "sd_bus_slot_set_description"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_slot_set_description, sd_bus_slot_get_description \- Set or query the description of bus slot objects
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_slot_set_description('u
32 .BI "int sd_bus_slot_set_description(sd_bus_slot*\ " "slot" ", const\ char\ *" "description" ");"
33 .HP \w'int\ sd_bus_slot_get_description('u
34 .BI "int sd_bus_slot_get_description(sd_bus_slot*\ " "bus" ", const\ char\ **" "description" ");"
35 .SH "DESCRIPTION"
36 .PP
37 \fBsd_bus_slot_set_description()\fR
38 sets the description string that is used in logging to the specified string\&. The string is copied internally and freed when the bus slot object is deallocated\&. The
39 \fIdescription\fR
40 argument may be
41 \fBNULL\fR, in which case the description is unset\&.
42 .PP
43 \fBsd_bus_slot_get_description()\fR
44 returns a description string in
45 \fIdescription\fR\&. If the string is not set, e\&.g\&. with
46 \fBsd_bus_slot_set_description()\fR, and the slot is a bus match callback slot, the match string will be returned\&. Otherwise,
47 \fB\-ENXIO\fR
48 is returned\&.
49 .SH "RETURN VALUE"
50 .PP
51 On success, these functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
52 .SS "Errors"
53 .PP
54 Returned errors may indicate the following problems:
55 .PP
56 \fB\-EINVAL\fR
57 .RS 4
58 An required argument is
59 \fBNULL\fR\&.
60 .RE
61 .PP
62 \fB\-ENXIO\fR
63 .RS 4
64 The bus slot object has no description\&.
65 .RE
66 .PP
67 \fB\-ENOMEM\fR
68 .RS 4
69 Memory allocation failed\&.
70 .RE
71 .SH "NOTES"
72 .PP
73 Functions described here are available as a shared library, which can be compiled against and linked to with the
74 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
75 file\&.
76 .PP
77 The code described here uses
78 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
79 \fBsetenv\fR(3)
80 from a parallel thread\&. It is recommended to only do calls to
81 \fBsetenv()\fR
82 from an early phase of the program when no other threads have been started\&.
83 .SH "HISTORY"
84 .PP
85 \fBsd_bus_slot_set_description()\fR
86 and
87 \fBsd_bus_slot_get_description()\fR
88 were added in version 240\&.
89 .SH "SEE ALSO"
90 .PP
91 \fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_slot_ref\fR(3), \fBsd_bus_slot_set_userdata\fR(3)