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