X Tutup
Skip to content

Commit a1a03fa

Browse files
sd-bus/man: document EBUSY error in bus_message_read (systemd#21954)
* sd-bus/man: document EBUSY error in bus_message_read The EBUSY error can be returned from sd_bus_exit_container(), and, if that happens, it will be propogated upwards towards bus_message_read. In terms of documentation, this means that bus_message_read's man page can't just include the error text for sd_bus_message_read_basic, as reading basic types exclusively doesn't have the potential for this error. sd_bus_message_read_basic's error documentation isn't incorrect when applied to sd_bus_message_read, it's just incomplete. While EBUSY is documented in sd_bus_message_open_container.xml, it's explanation is unique to the sd_bus_message_exit_container function and makes for poor documentation of the general read API.
1 parent ed3abbf commit a1a03fa

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

man/sd_bus_message_read.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,23 @@
172172
<para>On success, these functions return a non-negative integer. On failure, they return a negative
173173
errno-style error code.</para>
174174

175-
<xi:include href="sd_bus_message_read_basic.xml" xpointer="errors" />
175+
<refsect2 id='errors'>
176+
<title>Errors</title>
177+
178+
<para>Returned errors may indicate the following problems:</para>
179+
180+
<variablelist>
181+
<xi:include href="sd_bus_message_read_basic.xml" xpointer="errors-einval"/>
182+
<xi:include href="sd_bus_message_read_basic.xml" xpointer="errors-enxio"/>
183+
<xi:include href="sd_bus_message_read_basic.xml" xpointer="errors-ebadmsg"/>
184+
<varlistentry>
185+
<term><constant>-EBUSY</constant></term>
186+
187+
<listitem><para>When reading from a container, this error will be returned if unread elements
188+
are left in the container.</para></listitem>
189+
</varlistentry>
190+
</variablelist>
191+
</refsect2>
176192
</refsect1>
177193

178194
<xi:include href="libsystemd-pkgconfig.xml" />

man/sd_bus_message_read_basic.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,21 +199,21 @@
199199
<para>Returned errors may indicate the following problems:</para>
200200

201201
<variablelist>
202-
<varlistentry>
202+
<varlistentry id="errors-einval">
203203
<term><constant>-EINVAL</constant></term>
204204

205205
<listitem><para>Specified type string is invalid or the message parameter is
206206
<constant>NULL</constant>.</para></listitem>
207207
</varlistentry>
208208

209-
<varlistentry>
209+
<varlistentry id="errors-enxio">
210210
<term><constant>-ENXIO</constant></term>
211211

212212
<listitem><para>The message does not contain the specified type at current position.
213213
</para></listitem>
214214
</varlistentry>
215215

216-
<varlistentry>
216+
<varlistentry id="errors-ebadmsg">
217217
<term><constant>-EBADMSG</constant></term>
218218

219219
<listitem><para>The message cannot be parsed.</para></listitem>

0 commit comments

Comments
 (0)
X Tutup