crosvm/devices
Daniel Verkamp 5c3815747a devices: vhost-user: clean up config functions
The generic type used in read_config() and write_config() was only used
to check the offset against the size of that type; the backend device is
capable of checking this itself, so we can drop the type from the
function signatures.

Additionally, fix the config functions to use the offset rather than
reading/writing the whole config and copying out the relevant parts.

This makes the config function implementation identical for all
vhost/user/vmm/ code.

BUG=None
TEST=mount vhost-user-fs filesystem in guest

Change-Id: I22493f4e87bff68ef9d68f1d1a0feeb29ec059da
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3867543
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-09-26 08:46:28 +00:00
..
src devices: vhost-user: clean up config functions 2022-09-26 08:46:28 +00:00
Cargo.toml devices: add feature flags to render_server_fd. 2022-09-22 20:21:59 +00:00