diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-04 15:57:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 15:57:35 +0100 |
commit | 1b8f3e66037b3cb59fec6c0fe778c8b3734b7093 (patch) | |
tree | 90009988f68b78ba44cd02375454a424eae2ea79 /samples/client.c | |
parent | 1bf9674158f8e9df1babc5d68d573e6fb06225ff (diff) | |
download | libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.zip libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.tar.gz libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.tar.bz2 |
refactor message handling path (#376)
Capture message handling inside a new vfu_msg_t private structure and pass that
around to the handlers. This provides no functional change, but greatly
simplifies and cleans up that path, especially around fd and iovec handling.
As part of fixing up the unit tests, start using global variables to reduce the
amount of boiler-plate.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/client.c b/samples/client.c index 0647328..e27a323 100644 --- a/samples/client.c +++ b/samples/client.c @@ -434,7 +434,7 @@ static int access_region(int sock, int region, bool is_write, uint64_t offset, void *data, size_t data_len) { - static int msg_id = -1; + static int msg_id = 0xf00f; struct vfio_user_region_access send_region_access = { .offset = offset, .region = region, |