diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-02-04 15:46:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 15:46:03 +0000 |
commit | 0e656dc985e7d9767a3430edf5886d9288fdec88 (patch) | |
tree | 419a65497cf7dbd57c3afc45c75026bb661b8075 /samples/client.c | |
parent | dc82d02a19716729c0d24dc7c3e5b0af12c9751a (diff) | |
download | libvfio-user-0e656dc985e7d9767a3430edf5886d9288fdec88.zip libvfio-user-0e656dc985e7d9767a3430edf5886d9288fdec88.tar.gz libvfio-user-0e656dc985e7d9767a3430edf5886d9288fdec88.tar.bz2 |
client/server: print number of FDs per region (#302)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/client.c b/samples/client.c index e7a04f5..7952e7d 100644 --- a/samples/client.c +++ b/samples/client.c @@ -320,12 +320,14 @@ get_device_region_info(int sock, uint32_t index) assert(nr_fds == 2); assert(fds[0] >= 0); assert(fds[1] >= 0); + } else { + nr_fds = 0; } cap_sz = region_info->argsz - sizeof(struct vfio_region_info); printf("%s: region_info[%d] offset %#llx flags %#x size %llu " - "cap_sz %lu\n", __func__, index, region_info->offset, - region_info->flags, region_info->size, cap_sz); + "cap_sz %lu #FDs %lu\n", __func__, index, region_info->offset, + region_info->flags, region_info->size, cap_sz, nr_fds); if (cap_sz) { struct vfio_region_info_cap_sparse_mmap *sparse = NULL; if (get_region_vfio_caps((struct vfio_info_cap_header*)(region_info + 1), |