aboutsummaryrefslogtreecommitdiff
path: root/samples/server.c
diff options
context:
space:
mode:
authorSwapnil Ingle <swapnil.ingle@nutanix.com>2020-10-07 12:04:08 -0400
committerSwapnil Ingle <swapnil.ingle@nutanix.com>2020-10-07 12:05:25 -0400
commite699304cbb97f5ac8fa47ded20d41c37e76ab512 (patch)
tree22d0712f73ffbda718188a34d2871e93f6069114 /samples/server.c
parent31a8d4d52088e8c3e7407c9904bf47a978e5da20 (diff)
downloadlibvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.zip
libvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.tar.gz
libvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.tar.bz2
client, server changes for VFIO_USER_DEVICE_RESET
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'samples/server.c')
-rw-r--r--samples/server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/samples/server.c b/samples/server.c
index 65f80d5..be3edfd 100644
--- a/samples/server.c
+++ b/samples/server.c
@@ -186,6 +186,11 @@ unsigned long map_area(void *pvt, unsigned long off, unsigned long len)
assert(false);
}
+static int device_reset(void *pvt)
+{
+ printf("device reset callback\n");
+}
+
int main(int argc, char *argv[])
{
int ret;
@@ -249,6 +254,7 @@ int main(int argc, char *argv[])
.irq_count[LM_DEV_INTX_IRQ_IDX] = 1,
},
.uuid = argv[optind],
+ .reset = device_reset,
.map_dma = map_dma,
.unmap_dma = unmap_dma,
.pvt = &server_data