diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-12-02 04:47:11 -0500 |
---|---|---|
committer | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-12-02 05:47:02 -0500 |
commit | ee1feabb520694633089f1811e8421f50e24c9dd (patch) | |
tree | daed4f04a153eeb9220cc4e53c429c0463ce030b /samples/null.c | |
parent | 207374c07b90e386462ca6c43405345b84723a8a (diff) | |
download | libvfio-user-ee1feabb520694633089f1811e8421f50e24c9dd.zip libvfio-user-ee1feabb520694633089f1811e8421f50e24c9dd.tar.gz libvfio-user-ee1feabb520694633089f1811e8421f50e24c9dd.tar.bz2 |
introduce PCI types
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/null.c')
-rw-r--r-- | samples/null.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/samples/null.c b/samples/null.c index 4dd50d0..adf3a46 100644 --- a/samples/null.c +++ b/samples/null.c @@ -71,6 +71,10 @@ int main(int argc, char **argv) { int ret; pthread_t thread; + vfu_pci_hdr_id_t id = { 0 }; + vfu_pci_hdr_ss_t ss = { 0 }; + vfu_pci_hdr_cc_t cc = { { 0 } }; + if (argc != 2) { errx(EXIT_FAILURE, "missing vfio-user socket path"); @@ -87,6 +91,9 @@ int main(int argc, char **argv) err(EXIT_FAILURE, "failed to setup log"); } + ret = vfu_pci_setup_config_hdr(vfu_ctx, id, ss, cc, + VFU_PCI_TYPE_CONVENTIONAL, 0); + ret = pthread_create(&thread, NULL, null_drive, vfu_ctx); if (ret != 0) { errno = ret; |