mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
9975e79f78
The vhost-vsock device had some special-case code to handle a file descriptor as the vhost device rather than a path. However, crosvm already has base::open_file(), which has special handling for magic /proc/self/fd/<N> paths and treats them as already-open file descriptors without requiring a separate command-line option. This change converts the vhost vsock device to accept only a path instead of a special path/fd enum, using base::open_file() to support passing already-open file descriptors via the /proc/self/fd path format. The existing --vhost-vsock-fd option is kept for compatibility, but it now just creates a /proc/self/fd path from the passed fd. Existing users are encouraged to migrate to --vhost-vsock-device. BUG=b:218223240 TEST=cargo test -p devices vsock::tests::params Change-Id: Ifad2b7ad0824d4f24d9b12a4af1448557fadcdc1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3564224 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |