]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd-bus-errors.xml
man: use <constant> for SD_BUS_ERROR_* and SD_BUS_NAME_* constants
[thirdparty/systemd.git] / man / sd-bus-errors.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7 -->
8
9 <refentry id="sd-bus-errors"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11
12 <refentryinfo>
13 <title>sd-bus-errors</title>
14 <productname>systemd</productname>
15 </refentryinfo>
16
17 <refmeta>
18 <refentrytitle>sd-bus-errors</refentrytitle>
19 <manvolnum>3</manvolnum>
20 </refmeta>
21
22 <refnamediv>
23 <refname>sd-bus-errors</refname>
24 <refname>SD_BUS_ERROR_FAILED</refname>
25 <refname>SD_BUS_ERROR_NO_MEMORY</refname>
26 <refname>SD_BUS_ERROR_SERVICE_UNKNOWN</refname>
27 <refname>SD_BUS_ERROR_NAME_HAS_NO_OWNER</refname>
28 <refname>SD_BUS_ERROR_NO_REPLY</refname>
29 <refname>SD_BUS_ERROR_IO_ERROR</refname>
30 <refname>SD_BUS_ERROR_BAD_ADDRESS</refname>
31 <refname>SD_BUS_ERROR_NOT_SUPPORTED</refname>
32 <refname>SD_BUS_ERROR_LIMITS_EXCEEDED</refname>
33 <refname>SD_BUS_ERROR_ACCESS_DENIED</refname>
34 <refname>SD_BUS_ERROR_AUTH_FAILED</refname>
35 <refname>SD_BUS_ERROR_NO_SERVER</refname>
36 <refname>SD_BUS_ERROR_TIMEOUT</refname>
37 <refname>SD_BUS_ERROR_NO_NETWORK</refname>
38 <refname>SD_BUS_ERROR_ADDRESS_IN_USE</refname>
39 <refname>SD_BUS_ERROR_DISCONNECTED</refname>
40 <refname>SD_BUS_ERROR_INVALID_ARGS</refname>
41 <refname>SD_BUS_ERROR_FILE_NOT_FOUND</refname>
42 <refname>SD_BUS_ERROR_FILE_EXISTS</refname>
43 <refname>SD_BUS_ERROR_UNKNOWN_METHOD</refname>
44 <refname>SD_BUS_ERROR_UNKNOWN_OBJECT</refname>
45 <refname>SD_BUS_ERROR_UNKNOWN_INTERFACE</refname>
46 <refname>SD_BUS_ERROR_UNKNOWN_PROPERTY</refname>
47 <refname>SD_BUS_ERROR_PROPERTY_READ_ONLY</refname>
48 <refname>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</refname>
49 <refname>SD_BUS_ERROR_INVALID_SIGNATURE</refname>
50 <refname>SD_BUS_ERROR_INCONSISTENT_MESSAGE</refname>
51 <refname>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</refname>
52 <refname>SD_BUS_ERROR_MATCH_RULE_INVALID</refname>
53 <refname>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</refname>
54
55 <refpurpose>Standard D-Bus error names</refpurpose>
56 </refnamediv>
57
58 <refsynopsisdiv>
59 <funcsynopsis>
60 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
61
62 <funcsynopsisinfo>#define SD_BUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
63 #define SD_BUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
64 #define SD_BUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown"
65 #define SD_BUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner"
66 #define SD_BUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
67 #define SD_BUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
68 #define SD_BUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
69 #define SD_BUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
70 #define SD_BUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
71 #define SD_BUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
72 #define SD_BUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
73 #define SD_BUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
74 #define SD_BUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
75 #define SD_BUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
76 #define SD_BUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
77 #define SD_BUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
78 #define SD_BUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
79 #define SD_BUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
80 #define SD_BUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists"
81 #define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
82 #define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject"
83 #define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface"
84 #define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty"
85 #define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly"
86 #define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
87 #define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature"
88 #define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage"
89 #define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
90 #define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
91 #define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \
92 "org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"</funcsynopsisinfo>
93
94 </funcsynopsis>
95 </refsynopsisdiv>
96
97 <refsect1>
98 <title>Description</title>
99
100 <para>In addition to the error names user programs define, D-Bus
101 knows a number of generic, standardized error names that are
102 listed below.</para>
103
104 <para>In addition to this list, in sd-bus, the special error
105 namespace <literal>System.Error.</literal> is used to map
106 arbitrary Linux system errors (as defined by <citerefentry
107 project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
108 to D-Bus errors and back. For example, the error
109 <constant>EUCLEAN</constant> is mapped to
110 <literal>System.Error.EUCLEAN</literal> and back.</para>
111
112 <variablelist>
113
114 <varlistentry>
115 <term><constant>SD_BUS_ERROR_FAILED</constant></term>
116 <listitem><para>A generic error indication. See the error
117 message for further details. This error name should be
118 avoided, in favor of a more expressive error
119 name.</para></listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><constant>SD_BUS_ERROR_NO_MEMORY</constant></term>
124 <listitem><para>A memory allocation failed, and the requested
125 operation could not be completed.</para></listitem>
126 </varlistentry>
127
128 <varlistentry>
129 <term><constant>SD_BUS_ERROR_SERVICE_UNKNOWN</constant></term>
130 <listitem><para>The contacted bus service is unknown and
131 cannot be activated.</para></listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term><constant>SD_BUS_ERROR_NAME_HAS_NO_OWNER</constant></term>
136 <listitem><para>The specified bus service name currently has
137 no owner.</para></listitem>
138 </varlistentry>
139 <varlistentry>
140 <term><constant>SD_BUS_ERROR_NO_REPLY</constant></term>
141 <listitem><para>A message did not receive a reply. This error
142 is usually generated after a timeout.</para></listitem>
143 </varlistentry>
144 <varlistentry>
145 <term><constant>SD_BUS_ERROR_IO_ERROR</constant></term>
146 <listitem><para>Generic input/output error, for example when
147 accessing a socket or other I/O context.</para></listitem>
148 </varlistentry>
149 <varlistentry>
150 <term><constant>SD_BUS_ERROR_BAD_ADDRESS</constant></term>
151 <listitem><para>The specified D-Bus bus address string is
152 malformed.</para></listitem>
153 </varlistentry>
154 <varlistentry>
155 <term><constant>SD_BUS_ERROR_NOT_SUPPORTED</constant></term>
156 <listitem><para>The requested operation is not supported on
157 the local system.</para></listitem>
158 </varlistentry>
159 <varlistentry>
160 <term><constant>SD_BUS_ERROR_LIMITS_EXCEEDED</constant></term>
161 <listitem><para>Some limited resource has been
162 exhausted.</para></listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><constant>SD_BUS_ERROR_ACCESS_DENIED</constant></term>
166 <listitem><para>Access to a resource has been denied due to security restrictions.</para></listitem>
167 </varlistentry>
168 <varlistentry>
169 <term><constant>SD_BUS_ERROR_AUTH_FAILED</constant></term>
170 <listitem><para>Authentication did not complete successfully.</para></listitem>
171 </varlistentry>
172 <varlistentry>
173 <term><constant>SD_BUS_ERROR_NO_SERVER</constant></term>
174 <listitem><para>Unable to connect to the specified server.</para></listitem>
175 </varlistentry>
176 <varlistentry>
177 <term><constant>SD_BUS_ERROR_TIMEOUT</constant></term>
178 <listitem><para>An operation timed out. Note that method calls
179 which timeout generate a
180 <constant>SD_BUS_ERROR_NO_REPLY</constant>.</para></listitem>
181 </varlistentry>
182 <varlistentry>
183 <term><constant>SD_BUS_ERROR_NO_NETWORK</constant></term>
184 <listitem><para>No network available to execute requested network operation on.</para></listitem>
185 </varlistentry>
186 <varlistentry>
187 <term><constant>SD_BUS_ERROR_ADDRESS_IN_USE</constant></term>
188 <listitem><para>The specified network address is already being listened on.</para></listitem>
189 </varlistentry>
190 <varlistentry>
191 <term><constant>SD_BUS_ERROR_DISCONNECTED</constant></term>
192 <listitem><para>The connection has been terminated.</para></listitem>
193 </varlistentry>
194 <varlistentry>
195 <term><constant>SD_BUS_ERROR_INVALID_ARGS</constant></term>
196 <listitem><para>One or more invalid arguments have been passed.</para></listitem>
197 </varlistentry>
198 <varlistentry>
199 <term><constant>SD_BUS_ERROR_FILE_NOT_FOUND</constant></term>
200 <listitem><para>The requested file could not be found.</para></listitem>
201 </varlistentry>
202 <varlistentry>
203 <term><constant>SD_BUS_ERROR_FILE_EXISTS</constant></term>
204 <listitem><para>The requested file already exists.</para></listitem>
205 </varlistentry>
206 <varlistentry>
207 <term><constant>SD_BUS_ERROR_UNKNOWN_METHOD</constant></term>
208 <listitem><para>The requested method does not exist in the selected interface.</para></listitem>
209 </varlistentry>
210 <varlistentry>
211 <term><constant>SD_BUS_ERROR_UNKNOWN_OBJECT</constant></term>
212 <listitem><para>The requested object does not exist in the selected service.</para></listitem>
213 </varlistentry>
214 <varlistentry>
215 <term><constant>SD_BUS_ERROR_UNKNOWN_INTERFACE</constant></term>
216 <listitem><para>The requested interface does not exist on the selected object.</para></listitem>
217 </varlistentry>
218 <varlistentry>
219 <term><constant>SD_BUS_ERROR_UNKNOWN_PROPERTY</constant></term>
220 <listitem><para>The requested property does not exist in the selected interface.</para></listitem>
221 </varlistentry>
222 <varlistentry>
223 <term><constant>SD_BUS_ERROR_PROPERTY_READ_ONLY</constant></term>
224 <listitem><para>A write operation was requested on a read-only property.</para></listitem>
225 </varlistentry>
226 <varlistentry>
227 <term><constant>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</constant></term>
228 <listitem><para>The requested PID is not known.</para></listitem>
229 </varlistentry>
230 <varlistentry>
231 <term><constant>SD_BUS_ERROR_INVALID_SIGNATURE</constant></term>
232 <listitem><para>The specified message signature is not
233 valid.</para>
234 </listitem>
235 </varlistentry>
236 <varlistentry>
237 <term><constant>SD_BUS_ERROR_INCONSISTENT_MESSAGE</constant></term>
238 <listitem><para>The passed message does not validate
239 correctly.</para></listitem>
240 </varlistentry>
241 <varlistentry>
242 <term><constant>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</constant></term>
243 <listitem><para>The specified match rule does not exist.</para></listitem>
244 </varlistentry>
245 <varlistentry>
246 <term><constant>SD_BUS_ERROR_MATCH_RULE_INVALID</constant></term>
247 <listitem><para>The specified match rule is invalid.</para></listitem>
248 </varlistentry>
249 <varlistentry>
250 <term><constant>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</constant></term>
251 <listitem><para>Access to the requested operation is not
252 permitted. However, it might be available after interactive
253 authentication. This is usually returned by method calls
254 supporting a framework for additional interactive
255 authorization, when interactive authorization was not enabled
256 with the
257 <citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry>
258 for the method call message.</para></listitem>
259 </varlistentry>
260 </variablelist>
261 </refsect1>
262
263 <xi:include href="libsystemd-pkgconfig.xml" />
264
265 <refsect1>
266 <title>See Also</title>
267
268 <para>
269 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
270 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
271 <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
272 <citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
273 <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
274 <citerefentry project='die-net'><refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum></citerefentry>
275 </para>
276 </refsect1>
277
278 </refentry>