mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
vmm_vhost: rename linux modules back to unix
The "Linux" code depends only on AF_UNIX sockets, which should be available on any unix-like platform. Change-Id: Icced9594bf61215fce39e2702cf2aeed86ea42a4 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5063680 Reviewed-by: Frederick Mayle <fmayle@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
fca49a3980
commit
f28c1d3bc8
8 changed files with 11 additions and 11 deletions
8
third_party/vmm_vhost/src/connection.rs
vendored
8
third_party/vmm_vhost/src/connection.rs
vendored
|
@ -4,9 +4,9 @@
|
|||
//! Common data structures for listener and endpoint.
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "android", target_os = "linux"))] {
|
||||
if #[cfg(unix)] {
|
||||
pub mod socket;
|
||||
mod linux;
|
||||
mod unix;
|
||||
} else if #[cfg(windows)] {
|
||||
mod tube;
|
||||
pub use tube::TubeEndpoint;
|
||||
|
@ -468,8 +468,8 @@ impl<R: Req> AsRawDescriptor for Endpoint<R> {
|
|||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "android", target_os = "linux"))] {
|
||||
pub(crate) use super::linux::tests::*;
|
||||
if #[cfg(unix)] {
|
||||
pub(crate) use super::unix::tests::*;
|
||||
} else if #[cfg(windows)] {
|
||||
pub(crate) use windows::tests::*;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ use base::ScmSocket;
|
|||
|
||||
use crate::connection::Listener;
|
||||
use crate::connection::Req;
|
||||
use crate::linux::SystemListener;
|
||||
use crate::message::*;
|
||||
use crate::take_single_file;
|
||||
use crate::unix::SystemListener;
|
||||
use crate::Endpoint;
|
||||
use crate::Error;
|
||||
use crate::Result;
|
||||
|
|
2
third_party/vmm_vhost/src/lib.rs
vendored
2
third_party/vmm_vhost/src/lib.rs
vendored
|
@ -451,7 +451,7 @@ mod tests {
|
|||
let descriptor =
|
||||
unsafe { tube_transporter::packed_tube::pack(tubes.0, std::process::id()).unwrap() };
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "linux"))]
|
||||
#[cfg(unix)]
|
||||
let descriptor = base::Event::new().unwrap();
|
||||
|
||||
master.set_slave_request_fd(&descriptor).unwrap();
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "android", target_os = "linux"))] {
|
||||
mod linux;
|
||||
if #[cfg(unix)] {
|
||||
mod unix;
|
||||
} else if #[cfg(windows)] {
|
||||
mod windows;
|
||||
}
|
||||
|
|
6
third_party/vmm_vhost/src/sys.rs
vendored
6
third_party/vmm_vhost/src/sys.rs
vendored
|
@ -4,9 +4,9 @@
|
|||
//! A wrapper module for platform dependent code.
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "android", target_os = "linux"))] {
|
||||
pub mod linux;
|
||||
use linux as platform;
|
||||
if #[cfg(unix)] {
|
||||
pub mod unix;
|
||||
use unix as platform;
|
||||
} else if #[cfg(windows)] {
|
||||
pub mod windows;
|
||||
use windows as platform;
|
||||
|
|
Loading…
Reference in a new issue