]>
Commit | Line | Data |
---|---|---|
9d3e5d11 LP |
1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
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 | This file is part of systemd. | |
7 | ||
8 | Copyright 2015 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | --> | |
23 | ||
24 | <refentry id="sd-bus-errors"> | |
25 | ||
26 | <refentryinfo> | |
27 | <title>sd-bus-errors</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>sd-bus-errors</refentrytitle> | |
42 | <manvolnum>3</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>sd-bus-errors</refname> | |
47 | <refname>SD_BUS_ERROR_FAILED</refname> | |
48 | <refname>SD_BUS_ERROR_NO_MEMORY</refname> | |
49 | <refname>SD_BUS_ERROR_SERVICE_UNKNOWN</refname> | |
50 | <refname>SD_BUS_ERROR_NAME_HAS_NO_OWNER</refname> | |
51 | <refname>SD_BUS_ERROR_NO_REPLY</refname> | |
52 | <refname>SD_BUS_ERROR_IO_ERROR</refname> | |
53 | <refname>SD_BUS_ERROR_BAD_ADDRESS</refname> | |
54 | <refname>SD_BUS_ERROR_NOT_SUPPORTED</refname> | |
55 | <refname>SD_BUS_ERROR_LIMITS_EXCEEDED</refname> | |
56 | <refname>SD_BUS_ERROR_ACCESS_DENIED</refname> | |
57 | <refname>SD_BUS_ERROR_AUTH_FAILED</refname> | |
58 | <refname>SD_BUS_ERROR_NO_SERVER</refname> | |
59 | <refname>SD_BUS_ERROR_TIMEOUT</refname> | |
60 | <refname>SD_BUS_ERROR_NO_NETWORK</refname> | |
61 | <refname>SD_BUS_ERROR_ADDRESS_IN_USE</refname> | |
62 | <refname>SD_BUS_ERROR_DISCONNECTED</refname> | |
63 | <refname>SD_BUS_ERROR_INVALID_ARGS</refname> | |
64 | <refname>SD_BUS_ERROR_FILE_NOT_FOUND</refname> | |
65 | <refname>SD_BUS_ERROR_FILE_EXISTS</refname> | |
66 | <refname>SD_BUS_ERROR_UNKNOWN_METHOD</refname> | |
67 | <refname>SD_BUS_ERROR_UNKNOWN_OBJECT</refname> | |
68 | <refname>SD_BUS_ERROR_UNKNOWN_INTERFACE</refname> | |
69 | <refname>SD_BUS_ERROR_UNKNOWN_PROPERTY</refname> | |
70 | <refname>SD_BUS_ERROR_PROPERTY_READ_ONLY</refname> | |
71 | <refname>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</refname> | |
72 | <refname>SD_BUS_ERROR_INVALID_SIGNATURE</refname> | |
73 | <refname>SD_BUS_ERROR_INCONSISTENT_MESSAGE</refname> | |
74 | <refname>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</refname> | |
75 | <refname>SD_BUS_ERROR_MATCH_RULE_INVALID</refname> | |
76 | <refname>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</refname> | |
77 | ||
78 | <refpurpose>Standard D-Bus error names</refpurpose> | |
79 | </refnamediv> | |
80 | ||
81 | <refsynopsisdiv> | |
82 | <funcsynopsis> | |
83 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
84 | ||
85 | <funcsynopsisinfo>#define SD_BUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed" | |
86 | #define SD_BUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory" | |
87 | #define SD_BUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown" | |
88 | #define SD_BUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner" | |
89 | #define SD_BUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply" | |
90 | #define SD_BUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError" | |
91 | #define SD_BUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress" | |
92 | #define SD_BUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported" | |
93 | #define SD_BUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded" | |
94 | #define SD_BUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied" | |
95 | #define SD_BUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed" | |
96 | #define SD_BUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer" | |
97 | #define SD_BUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout" | |
98 | #define SD_BUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork" | |
99 | #define SD_BUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse" | |
100 | #define SD_BUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected" | |
101 | #define SD_BUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs" | |
102 | #define SD_BUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound" | |
103 | #define SD_BUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists" | |
104 | #define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod" | |
105 | #define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject" | |
106 | #define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface" | |
107 | #define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty" | |
108 | #define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly" | |
109 | #define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown" | |
110 | #define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature" | |
111 | #define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage" | |
112 | #define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound" | |
113 | #define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid" | |
114 | #define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \ | |
115 | "org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"</funcsynopsisinfo> | |
116 | ||
117 | </funcsynopsis> | |
118 | </refsynopsisdiv> | |
119 | ||
120 | <refsect1> | |
121 | <title>Description</title> | |
122 | ||
123 | <para>In addition to the error names user programs define, D-Bus | |
b938cb90 | 124 | knows a number of generic, standardized error names that are |
9d3e5d11 LP |
125 | listed below.</para> |
126 | ||
b938cb90 | 127 | <para>In addition to this list, in sd-bus, the special error |
9d3e5d11 LP |
128 | namespace <literal>System.Error.</literal> is used to map |
129 | arbitrary Linux system errors (as defined by <citerefentry | |
130 | project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>) | |
131 | to D-Bus errors and back. For example, the error | |
132 | <constant>EUCLEAN</constant> is mapped to | |
133 | <literal>System.Error.EUCLEAN</literal> and back.</para> | |
134 | ||
135 | <variablelist> | |
136 | ||
137 | <varlistentry> | |
138 | <term><varname>SD_BUS_ERROR_FAILED</varname></term> | |
139 | <listitem><para>A generic error indication. See the error | |
140 | message for further details. This error name should be | |
dd2b607b | 141 | avoided, in favor of a more expressive error |
9d3e5d11 LP |
142 | name.</para></listitem> |
143 | </varlistentry> | |
144 | ||
145 | <varlistentry> | |
146 | <term><varname>SD_BUS_ERROR_NO_MEMORY</varname></term> | |
147 | <listitem><para>A memory allocation failed, and the requested | |
148 | operation could not be completed.</para></listitem> | |
149 | </varlistentry> | |
150 | ||
151 | <varlistentry> | |
152 | <term><varname>SD_BUS_ERROR_SERVICE_UNKNOWN</varname></term> | |
153 | <listitem><para>The contacted bus service is unknown and | |
154 | cannot be activated.</para></listitem> | |
155 | </varlistentry> | |
156 | ||
157 | <varlistentry> | |
158 | <term><varname>SD_BUS_ERROR_NAME_HAS_NO_OWNER</varname></term> | |
159 | <listitem><para>The specified bus service name currently has | |
160 | no owner.</para></listitem> | |
161 | </varlistentry> | |
162 | <varlistentry> | |
163 | <term><varname>SD_BUS_ERROR_NO_REPLY</varname></term> | |
164 | <listitem><para>A message did not receive a reply. This error | |
165 | is usually generated after a timeout.</para></listitem> | |
166 | </varlistentry> | |
167 | <varlistentry> | |
168 | <term><varname>SD_BUS_ERROR_IO_ERROR</varname></term> | |
169 | <listitem><para>Generic input/output error, for example when | |
b938cb90 | 170 | accessing a socket or other I/O context.</para></listitem> |
9d3e5d11 LP |
171 | </varlistentry> |
172 | <varlistentry> | |
173 | <term><varname>SD_BUS_ERROR_BAD_ADDRESS</varname></term> | |
174 | <listitem><para>The specified D-Bus bus address string is | |
175 | malformed.</para></listitem> | |
176 | </varlistentry> | |
177 | <varlistentry> | |
178 | <term><varname>SD_BUS_ERROR_NOT_SUPPORTED</varname></term> | |
179 | <listitem><para>The requested operation is not supported on | |
180 | the local system.</para></listitem> | |
181 | </varlistentry> | |
182 | <varlistentry> | |
183 | <term><varname>SD_BUS_ERROR_LIMITS_EXCEEDED</varname></term> | |
184 | <listitem><para>Some limited resource has been | |
185 | exhausted.</para></listitem> | |
186 | </varlistentry> | |
187 | <varlistentry> | |
188 | <term><varname>SD_BUS_ERROR_ACCESS_DENIED</varname></term> | |
b938cb90 | 189 | <listitem><para>Access to a resource has been denied due to security restrictions.</para></listitem> |
9d3e5d11 LP |
190 | </varlistentry> |
191 | <varlistentry> | |
192 | <term><varname>SD_BUS_ERROR_AUTH_FAILED</varname></term> | |
193 | <listitem><para>Authentication did not complete successfully.</para></listitem> | |
194 | </varlistentry> | |
195 | <varlistentry> | |
196 | <term><varname>SD_BUS_ERROR_NO_SERVER</varname></term> | |
197 | <listitem><para>Unable to connect to the specified server.</para></listitem> | |
198 | </varlistentry> | |
199 | <varlistentry> | |
200 | <term><varname>SD_BUS_ERROR_TIMEOUT</varname></term> | |
201 | <listitem><para>An operation timed out. Note that method calls | |
202 | which timeout generate a | |
203 | <varname>SD_BUS_ERROR_NO_REPLY</varname>.</para></listitem> | |
204 | </varlistentry> | |
205 | <varlistentry> | |
206 | <term><varname>SD_BUS_ERROR_NO_NETWORK</varname></term> | |
207 | <listitem><para>No network available to execute requested network operation on.</para></listitem> | |
208 | </varlistentry> | |
209 | <varlistentry> | |
210 | <term><varname>SD_BUS_ERROR_ADDRESS_IN_USE</varname></term> | |
211 | <listitem><para>The specified network address is already being listened on.</para></listitem> | |
212 | </varlistentry> | |
213 | <varlistentry> | |
214 | <term><varname>SD_BUS_ERROR_DISCONNECTED</varname></term> | |
215 | <listitem><para>The connection has been terminated.</para></listitem> | |
216 | </varlistentry> | |
217 | <varlistentry> | |
218 | <term><varname>SD_BUS_ERROR_INVALID_ARGS</varname></term> | |
219 | <listitem><para>One or more invalid arguments have been passed.</para></listitem> | |
220 | </varlistentry> | |
221 | <varlistentry> | |
222 | <term><varname>SD_BUS_ERROR_FILE_NOT_FOUND</varname></term> | |
223 | <listitem><para>The requested file could not be found.</para></listitem> | |
224 | </varlistentry> | |
225 | <varlistentry> | |
226 | <term><varname>SD_BUS_ERROR_FILE_EXISTS</varname></term> | |
a8eaaee7 | 227 | <listitem><para>The requested file already exists.</para></listitem> |
9d3e5d11 LP |
228 | </varlistentry> |
229 | <varlistentry> | |
230 | <term><varname>SD_BUS_ERROR_UNKNOWN_METHOD</varname></term> | |
231 | <listitem><para>The requested method does not exist in the selected interface.</para></listitem> | |
232 | </varlistentry> | |
233 | <varlistentry> | |
234 | <term><varname>SD_BUS_ERROR_UNKNOWN_OBJECT</varname></term> | |
235 | <listitem><para>The requested object does not exist in the selected service.</para></listitem> | |
236 | </varlistentry> | |
237 | <varlistentry> | |
238 | <term><varname>SD_BUS_ERROR_UNKNOWN_INTERFACE</varname></term> | |
239 | <listitem><para>The requested interface does not exist on the selected object.</para></listitem> | |
240 | </varlistentry> | |
241 | <varlistentry> | |
242 | <term><varname>SD_BUS_ERROR_UNKNOWN_PROPERTY</varname></term> | |
243 | <listitem><para>The requested property does not exist in the selected interface.</para></listitem> | |
244 | </varlistentry> | |
245 | <varlistentry> | |
246 | <term><varname>SD_BUS_ERROR_PROPERTY_READ_ONLY</varname></term> | |
247 | <listitem><para>A write operation was requested on a read-only property.</para></listitem> | |
248 | </varlistentry> | |
249 | <varlistentry> | |
250 | <term><varname>SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</varname></term> | |
251 | <listitem><para>The requested PID is not known.</para></listitem> | |
252 | </varlistentry> | |
253 | <varlistentry> | |
254 | <term><varname>SD_BUS_ERROR_INVALID_SIGNATURE</varname></term> | |
255 | <listitem><para>The specified message signature is not | |
256 | valid.</para> | |
257 | </listitem> | |
258 | </varlistentry> | |
259 | <varlistentry> | |
260 | <term><varname>SD_BUS_ERROR_INCONSISTENT_MESSAGE</varname></term> | |
261 | <listitem><para>The passed message does not validate | |
262 | correctly.</para></listitem> | |
263 | </varlistentry> | |
264 | <varlistentry> | |
265 | <term><varname>SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</varname></term> | |
266 | <listitem><para>The specified match rule does not exist.</para></listitem> | |
267 | </varlistentry> | |
268 | <varlistentry> | |
269 | <term><varname>SD_BUS_ERROR_MATCH_RULE_INVALID</varname></term> | |
270 | <listitem><para>The specified match rule is invalid.</para></listitem> | |
271 | </varlistentry> | |
272 | <varlistentry> | |
273 | <term><varname>SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED</varname></term> | |
274 | <listitem><para>Access to the requested operation is not | |
b938cb90 | 275 | permitted. However, it might be available after interactive |
9d3e5d11 LP |
276 | authentication. This is usually returned by method calls |
277 | supporting a framework for additional interactive | |
278 | authorization, when interactive authorization was not enabled | |
279 | with the | |
280 | <citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
281 | for the method call message.</para></listitem> | |
282 | </varlistentry> | |
283 | </variablelist> | |
284 | </refsect1> | |
285 | ||
286 | <refsect1> | |
287 | <title>Notes</title> | |
288 | ||
289 | <para>The various error definitions described here are available | |
290 | as a shared library, which can be compiled and linked to with the | |
291 | <constant>libsystemd</constant> <citerefentry | |
292 | project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
293 | file.</para> | |
294 | </refsect1> | |
295 | ||
296 | <refsect1> | |
297 | <title>See Also</title> | |
298 | ||
299 | <para> | |
300 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
301 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
302 | <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
303 | <citerefentry><refentrytitle>sd_bus_message_set_allow_interactive_authorization</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
304 | <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
305 | <citerefentry project='die-net'><refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
306 | </para> | |
307 | </refsect1> | |
308 | ||
309 | </refentry> |