aboutsummaryrefslogtreecommitdiff
path: root/samples/server.c
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2021-11-30 14:40:18 +0000
committerGitHub <noreply@github.com>2021-11-30 14:40:18 +0000
commitf2dd09649e31540996fa4e9497693d1b27bc88fe (patch)
tree004db91ebc9cfa68af9bd5f2ff96fc11fabcb6db /samples/server.c
parent02174878b1f7a70d3ac09c50c12799df0a1f9406 (diff)
downloadlibvfio-user-f2dd09649e31540996fa4e9497693d1b27bc88fe.zip
libvfio-user-f2dd09649e31540996fa4e9497693d1b27bc88fe.tar.gz
libvfio-user-f2dd09649e31540996fa4e9497693d1b27bc88fe.tar.bz2
introduce device quiesce callback (#609)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Leon <john.levon@nutanix.com>
Diffstat (limited to 'samples/server.c')
-rw-r--r--samples/server.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/samples/server.c b/samples/server.c
index 416d5c8..a43dc3c 100644
--- a/samples/server.c
+++ b/samples/server.c
@@ -170,7 +170,7 @@ dma_register(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info)
server_data->regions[idx].prot = info->prot;
}
-static int
+static void
dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info)
{
struct server_data *server_data = vfu_get_private(vfu_ctx);
@@ -181,11 +181,8 @@ dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info)
server_data->regions[idx].iova.iov_base == info->iova.iov_base) {
server_data->regions[idx].iova.iov_base = NULL;
server_data->regions[idx].iova.iov_len = 0;
- return 0;
}
}
-
- return ERROR_INT(EINVAL);
}
static void