From 8f464f0f52ac4c10b1c10376d26eddc644492966 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 4 Feb 2021 09:58:55 +0000 Subject: 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 Reviewed-by: Swapnil Ingle --- lib/private.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/private.h') 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 { -- cgit v1.1