]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: fix sd_bus_add_node_enumerator() ret_nodes
authorMatt Johnston <matt@codeconstruct.com.au>
Tue, 15 Jun 2021 03:49:26 +0000 (11:49 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 15 Jun 2021 10:29:44 +0000 (11:29 +0100)
ret_nodes is NULL terminated, the return value isn't a count.

man/sd_bus_add_node_enumerator.xml

index da3989ef94b367429bbb0c82fdc56ef1f1f83d12..c6beb1dcd1bbab17fd40e739eebca87a4234e802 100644 (file)
@@ -58,8 +58,9 @@
 
     <para><parameter>callback</parameter> is called with the path and userdata pointer registered
     with <function>sd_bus_add_node_enumerator()</function>. When called, it should store all the
-    child object paths of the given path prefix in <parameter>ret_nodes</parameter> 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 <parameter>ret_nodes</parameter> 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 <parameter>ret_error</parameter> 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 <parameter>ret_error</parameter> take priority over negative return values.</para>