diff options
author | John Levon <john.levon@nutanix.com> | 2020-12-07 10:48:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 10:48:56 +0000 |
commit | e653a69a6a13094fcb9985c4b4e4068ae91d54ac (patch) | |
tree | 204d3c6bdb8d7a451ee6202393774228fc59bae5 | |
parent | f0fdfa8936dc908e024202aa9bfc203cd3d3c816 (diff) | |
download | libvfio-user-e653a69a6a13094fcb9985c4b4e4068ae91d54ac.zip libvfio-user-e653a69a6a13094fcb9985c4b4e4068ae91d54ac.tar.gz libvfio-user-e653a69a6a13094fcb9985c4b4e4068ae91d54ac.tar.bz2 |
setup an IRQ for the gpio sample server (#169)
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r-- | samples/gpio-pci-idio-16.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c index 494fb1a..e786d43 100644 --- a/samples/gpio-pci-idio-16.c +++ b/samples/gpio-pci-idio-16.c @@ -128,6 +128,11 @@ main(int argc, char *argv[]) goto out; } + ret = vfu_setup_device_nr_irqs(vfu_ctx, VFU_DEV_INTX_IRQ, 1); + if (ret < 0) { + err(EXIT_FAILURE, "failed to setup irq counts"); + } + ret = vfu_ctx_drive(vfu_ctx); if (ret != 0) { if (ret != -ENOTCONN && ret != -EINTR) { |