aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-12-02 04:46:28 -0500
committerThanos Makatos <thanos.makatos@nutanix.com>2020-12-02 04:46:28 -0500
commit207374c07b90e386462ca6c43405345b84723a8a (patch)
treeef8928d5c1b634a48dc2d5e7e1d21a7fa2f2ed59 /samples
parenta623866f21bdc102f0d96cbd196a3080439caa30 (diff)
downloadlibvfio-user-207374c07b90e386462ca6c43405345b84723a8a.zip
libvfio-user-207374c07b90e386462ca6c43405345b84723a8a.tar.gz
libvfio-user-207374c07b90e386462ca6c43405345b84723a8a.tar.bz2
introduce device type
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/gpio-pci-idio-16.c3
-rw-r--r--samples/null.c3
-rw-r--r--samples/server.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c
index 17dfdaa..1881ec0 100644
--- a/samples/gpio-pci-idio-16.c
+++ b/samples/gpio-pci-idio-16.c
@@ -99,7 +99,8 @@ main(int argc, char *argv[])
err(EXIT_FAILURE, "failed to register signal handler");
}
- vfu_ctx = vfu_create_ctx(VFU_TRANS_SOCK, argv[optind], 0, NULL);
+ vfu_ctx = vfu_create_ctx(VFU_TRANS_SOCK, argv[optind], 0, NULL,
+ VFU_DEV_TYPE_PCI);
if (vfu_ctx == NULL) {
if (errno == EINTR) {
printf("interrupted\n");
diff --git a/samples/null.c b/samples/null.c
index 99e35cc..4dd50d0 100644
--- a/samples/null.c
+++ b/samples/null.c
@@ -76,7 +76,8 @@ int main(int argc, char **argv)
errx(EXIT_FAILURE, "missing vfio-user socket path");
}
- vfu_ctx_t *vfu_ctx = vfu_create_ctx(VFU_TRANS_SOCK, argv[1], 0, NULL);
+ vfu_ctx_t *vfu_ctx = vfu_create_ctx(VFU_TRANS_SOCK, argv[1], 0, NULL,
+ VFU_DEV_TYPE_PCI);
if (vfu_ctx == NULL) {
err(EXIT_FAILURE, "failed to create libvfio-user context");
}
diff --git a/samples/server.c b/samples/server.c
index 571e374..ba1ac67 100644
--- a/samples/server.c
+++ b/samples/server.c
@@ -411,7 +411,8 @@ int main(int argc, char *argv[])
}
server_data.vfu_ctx = vfu_ctx = vfu_create_ctx(VFU_TRANS_SOCK, argv[optind],
- 0, &server_data);
+ 0, &server_data,
+ VFU_DEV_TYPE_PCI);
if (vfu_ctx == NULL) {
err(EXIT_FAILURE, "failed to initialize device emulation\n");
}