aboutsummaryrefslogtreecommitdiff
path: root/lib/private.h
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-02-16 16:11:35 +0000
committerGitHub <noreply@github.com>2021-02-16 16:11:35 +0000
commitb4baf039588830dfd580a59e7d05efbc65cb6d03 (patch)
treee54da2a141a202362c3313200de16d4bef35ca9b /lib/private.h
parent4b8d6d3898c28ff87f32b59e48e7e73158e786f8 (diff)
downloadlibvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.zip
libvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.tar.gz
libvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.tar.bz2
fix DEVICE_GET_INFO specification and handling (#344)
The specification for DEVICE_GET_INFO differed from the implementation. After some discussion, fix the spec such that the struct should be passed in with ->argsz set. As it happened, the implementation was also wrong: we weren't actually checking the incoming ->argsz for validation, but we should. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r--lib/private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private.h b/lib/private.h
index 787cae9..edd7b68 100644
--- a/lib/private.h
+++ b/lib/private.h
@@ -177,7 +177,8 @@ consume_fd(int *fds, size_t nr_fds, size_t index);
int
handle_device_get_info(vfu_ctx_t *vfu_ctx, uint32_t size,
- struct vfio_device_info *dev_info);
+ struct vfio_device_info *in_dev_info,
+ struct vfio_device_info *out_dev_info);
long
dev_get_reginfo(vfu_ctx_t *vfu_ctx, uint32_t index, uint32_t argsz,