From e65357b6585629ee2138e53d02face3914621a2e Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 15 Jun 2021 11:49:26 +0800 Subject: [PATCH] man: fix sd_bus_add_node_enumerator() ret_nodes ret_nodes is NULL terminated, the return value isn't a count. --- man/sd_bus_add_node_enumerator.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/sd_bus_add_node_enumerator.xml b/man/sd_bus_add_node_enumerator.xml index da3989ef94..c6beb1dcd1 100644 --- a/man/sd_bus_add_node_enumerator.xml +++ b/man/sd_bus_add_node_enumerator.xml @@ -58,8 +58,9 @@ callback is called with the path and userdata pointer registered with sd_bus_add_node_enumerator(). When called, it should store all the - child object paths of the given path prefix in ret_nodes and return the - number of child objects under the given prefix. If an error occurs, it can either return a + child object paths of the given path prefix in ret_nodes with a NULL + terminator item. The callback should return a non-negative value on success. + If an error occurs, it can either return a negative integer, set ret_error to a non-empty error or do both. Any errors returned by the callback are encoded as D-Bus errors and sent back to the caller. Errors in ret_error take priority over negative return values.