aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-02-15 15:21:47 +0000
committerGitHub <noreply@github.com>2021-02-15 15:21:47 +0000
commita0e38496e33699da1b96a34a3d947ccb0718db7e (patch)
tree7fe78e0300017c01e52696e46afe7cc892916f2e /include
parent33430ae0968c548427258cdc726861fd4daa2637 (diff)
downloadlibvfio-user-a0e38496e33699da1b96a34a3d947ccb0718db7e.zip
libvfio-user-a0e38496e33699da1b96a34a3d947ccb0718db7e.tar.gz
libvfio-user-a0e38496e33699da1b96a34a3d947ccb0718db7e.tar.bz2
make file descriptors private to the transport (#321)
General code has no business knowing about the socket file descriptors. vfu_attach_ctx() is changed to not return the file descriptor; we'll re-expose a suitable file descriptor in a follow-up Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r--include/libvfio-user.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h
index e48514a..11666d0 100644
--- a/include/libvfio-user.h
+++ b/include/libvfio-user.h
@@ -116,12 +116,13 @@ int
vfu_realize_ctx(vfu_ctx_t *vfu_ctx);
/*
- * Attempts to attach to the transport. Attach is mandatory before
- * vfu_run_ctx() and is non blocking if context is created
- * with LIBVFIO_USER_FLAG_ATTACH_NB flag.
- * Returns client's file descriptor on success and -1 on error. If errno is
- * set to EAGAIN or EWOULDBLOCK then the transport is not ready to attach to and
- * the operation must be retried.
+ * Attempts to attach to the transport. Attach is mandatory before vfu_run_ctx()
+ * and is non blocking if context is created with LIBVFIO_USER_FLAG_ATTACH_NB
+ * flag.
+ *
+ * @returns: 0 on success, -1 on error. Sets errno. If errno is set to EAGAIN
+ * or EWOULDBLOCK then the transport is not ready to attach to and the operation
+ * must be retried.
*
* @vfu_ctx: the libvfio-user context
*/