From 4140a7d1871bae2d73a1fe6955af75ac07e7e86f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 11 Mar 2020 19:52:43 +0000 Subject: the great renaming --- src/linux.rs | 2 +- src/wl.rs | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/linux.rs b/src/linux.rs index d332780..286d387 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -762,7 +762,7 @@ fn create_wayland_device( .collect::>>() .ok_or(Error::InvalidWaylandPath)?; - let dev = virtio::Wl::new(cfg.wayland_socket_paths.clone(), socket, resource_bridge) + let dev = virtio::Controller::new(cfg.wayland_socket_paths.clone(), socket, resource_bridge) .map_err(Error::WaylandDeviceNew)?; let jail = match simple_jail(&cfg, "wl_device")? { diff --git a/src/wl.rs b/src/wl.rs index be473d4..1e3b0a3 100644 --- a/src/wl.rs +++ b/src/wl.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause -use devices::virtio::{wl2, InterruptProxy, InterruptProxyEvent, SingleFd}; +use devices::virtio::{Activate, InterruptProxy, InterruptProxyEvent, VirtioDevice, Wl}; use msg_socket::{MsgReceiver, MsgSocket}; use std::collections::BTreeMap; use std::fs::remove_file; @@ -12,7 +12,7 @@ pub use aarch64::{arch_memory_regions, MemoryParams}; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub use x86_64::{arch_memory_regions, MemoryParams}; -type Socket = MsgSocket<(), SingleFd>; +type Socket = MsgSocket<(), Activate>; fn main() { eprintln!("hello world"); @@ -32,20 +32,18 @@ fn main() { loop { match msg_socket.recv() { - Ok(SingleFd { + Ok(Activate { shm, interrupt, interrupt_resample_evt, in_queue, out_queue, vm_socket, - use_transition_flags, in_queue_evt, out_queue_evt, - kill_evt, }) => { if wl.is_some() { - panic!("Received SingleFd twice"); + panic!("Received Activate twice"); } let shm = shm.owned(); @@ -64,9 +62,7 @@ fn main() { let mut wayland_paths = BTreeMap::new(); wayland_paths.insert("".into(), "/run/user/1000/wayland-0".into()); - use devices::virtio::VirtioDevice; - - let mut wl_ = wl2::Wl::new(wayland_paths, vm_socket, None).unwrap(); + let mut wl_ = Wl::new(wayland_paths, vm_socket, None).unwrap(); println!("constructed Wl"); -- cgit 1.4.1