diff options
author | John Levon <john.levon@nutanix.com> | 2021-02-04 09:58:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 09:58:55 +0000 |
commit | 8f464f0f52ac4c10b1c10376d26eddc644492966 (patch) | |
tree | 1264657242e5f5bb6f8ed552a4289a2d6c5d05b9 /lib/private.h | |
parent | 3eca929802ed6efb57d9ee37a3d6728e3b8521c8 (diff) | |
download | libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.zip libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.tar.gz libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.tar.bz2 |
close listening socket in vfu_destroy_ctx() (#299)
We were forgetting to close vfu_ctx->fd, add a tran callback for this. While
we're there, clean up the tran callbacks somewhat.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r-- | lib/private.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private.h b/lib/private.h index c7a4b68..b464e04 100644 --- a/lib/private.h +++ b/lib/private.h @@ -44,11 +44,14 @@ ERROR(int err) } struct transport_ops { - int (*init)(vfu_ctx_t*); - int (*attach)(vfu_ctx_t*); - int(*detach)(vfu_ctx_t*); - int (*get_request)(vfu_ctx_t*, struct vfio_user_header*, + int (*init)(vfu_ctx_t *vfu_ctx); + int (*attach)(vfu_ctx_t *vfu_ctx); + + int (*get_request)(vfu_ctx_t *vfu_ctx, struct vfio_user_header *hdr, int *fds, size_t *nr_fds); + + void (*detach)(vfu_ctx_t *vfu_ctx); + void (*fini)(vfu_ctx_t *vfu_ctx); }; typedef enum { |