aboutsummaryrefslogtreecommitdiff
path: root/samples/gpio-pci-idio-16.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r--samples/gpio-pci-idio-16.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c
index e786d43..a957117 100644
--- a/samples/gpio-pci-idio-16.c
+++ b/samples/gpio-pci-idio-16.c
@@ -133,6 +133,16 @@ main(int argc, char *argv[])
err(EXIT_FAILURE, "failed to setup irq counts");
}
+ ret = vfu_realize_ctx(vfu_ctx);
+ if (ret < 0) {
+ err(EXIT_FAILURE, "failed to realize device");
+ }
+
+ ret = vfu_attach_ctx(vfu_ctx);
+ if (ret < 0) {
+ err(EXIT_FAILURE, "failed to attach device");
+ }
+
ret = vfu_ctx_drive(vfu_ctx);
if (ret != 0) {
if (ret != -ENOTCONN && ret != -EINTR) {