From 9a109a9a11a827b575994ff298de57747a41bed9 Mon Sep 17 00:00:00 2001 From: lincoln auster Date: Tue, 11 Jan 2022 03:47:31 -0700 Subject: [PATCH] sd-bus/man: document EBUSY error in bus_message_read (#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. (cherry picked from commit a1a03fa54bfb45315eefaa49ceb38a21aceafde8) --- man/sd_bus_message_read.xml | 18 +++++++++++++++++- man/sd_bus_message_read_basic.xml | 6 +++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/man/sd_bus_message_read.xml b/man/sd_bus_message_read.xml index 0b921258dc..aa325f39c2 100644 --- a/man/sd_bus_message_read.xml +++ b/man/sd_bus_message_read.xml @@ -172,7 +172,23 @@ On success, these functions return a non-negative integer. On failure, they return a negative errno-style error code. - + + Errors + + Returned errors may indicate the following problems: + + + + + + + -EBUSY + + When reading from a container, this error will be returned if unread elements + are left in the container. + + + diff --git a/man/sd_bus_message_read_basic.xml b/man/sd_bus_message_read_basic.xml index bd5a149a26..55951430e6 100644 --- a/man/sd_bus_message_read_basic.xml +++ b/man/sd_bus_message_read_basic.xml @@ -199,21 +199,21 @@ Returned errors may indicate the following problems: - + -EINVAL Specified type string is invalid or the message parameter is NULL. - + -ENXIO The message does not contain the specified type at current position. - + -EBADMSG The message cannot be parsed.