diff options
author | Mattias Nissler <122288598+mnissler-rivos@users.noreply.github.com> | 2023-08-30 17:19:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 16:19:50 +0100 |
commit | f981913abd9a5926d38a48c6ba9b1ba7dacb1c11 (patch) | |
tree | fd987030168cc14095322664e86feaefaa362582 /test | |
parent | 149aa845b11bd13fca41dcf65b51283f83ac5520 (diff) | |
download | libvfio-user-f981913abd9a5926d38a48c6ba9b1ba7dacb1c11.zip libvfio-user-f981913abd9a5926d38a48c6ba9b1ba7dacb1c11.tar.gz libvfio-user-f981913abd9a5926d38a48c6ba9b1ba7dacb1c11.tar.bz2 |
Replace protocol header flags bit field with mask (#773)
It turns out that the bit field will not yield the desired / specified
bit layout on big-endian systems, see issue #768 for details. Thus,
replace the bit field with constants for the individual fields and use
bit masking when accessing the flags field.
Signed-off-by: Mattias Nissler <mnissler@rivosinc.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/unit-tests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit-tests.c b/test/unit-tests.c index 0fd4fe7..310eb23 100644 --- a/test/unit-tests.c +++ b/test/unit-tests.c @@ -105,7 +105,7 @@ setup(void **state UNUSED) memset(&msg, 0, sizeof(msg)); - msg.hdr.flags.type = VFIO_USER_F_TYPE_COMMAND; + msg.hdr.flags |= VFIO_USER_F_TYPE_COMMAND; msg.hdr.msg_size = sizeof(msg.hdr); fds[0] = fds[1] = -1; |