]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: fix virEventAddHandle return details
authorJonathan Lebon <jlebon@redhat.com>
Wed, 18 Sep 2013 18:56:01 +0000 (14:56 -0400)
committerEric Blake <eblake@redhat.com>
Wed, 18 Sep 2013 19:06:13 +0000 (13:06 -0600)
In commit 6d41cb8, the interface for virEventAddHandleFunc was changed.
This patch updates the documentation for virEventAddHandle to reflect
the new significance of the return value. Also, both functions now
mention -1 for failure.

include/libvirt/libvirt.h.in
src/util/virevent.c

index a47e33cc73affc348ad08c488142b22a05af919d..7944dfb607b9e0e5220ddf862e26602a03fbc78c 100644 (file)
@@ -3643,8 +3643,8 @@ typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaq
  * If 'ff' callbacks are invoked directly from the virEventRemoveHandleFunc
  * they will likely deadlock in libvirt.
  *
- * Returns a handle watch number to be used for updating
- * and unregistering for events
+ * Returns -1 if the file handle cannot be registered, otherwise a handle
+ * watch number to be used for updating and unregistering for events
  */
 typedef int (*virEventAddHandleFunc)(int fd, int event,
                                      virEventHandleCallback cb,
index 886cb6d3058ebf5c0756c46797127c05bbbb1ba0..fde29a2be1ff4f51f83176de29fa163ea7b097d8 100644 (file)
@@ -48,7 +48,8 @@ static virEventRemoveTimeoutFunc removeTimeoutImpl = NULL;
  *
  * Register a callback for monitoring file handle events.
  *
- * Returns -1 if the file handle cannot be registered, 0 upon success
+ * Returns -1 if the file handle cannot be registered, otherwise a handle
+ * watch number to be used for updating and unregistering for events
  */
 int
 virEventAddHandle(int fd,