From 8dc06aa50d1599166c834c1124e9689985cadafe Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Tue, 21 May 2019 12:06:19 -0700 Subject: [PATCH] vm-virtio: Remove unneeded code Remove legacy code coming from Firecracker and/or Crosvm. Signed-off-by: Sebastien Boeuf --- vm-virtio/src/lib.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/vm-virtio/src/lib.rs b/vm-virtio/src/lib.rs index 2f922bff7..82a9fb907 100755 --- a/vm-virtio/src/lib.rs +++ b/vm-virtio/src/lib.rs @@ -17,7 +17,6 @@ extern crate virtio_bindings; extern crate vm_memory; use std::fmt; -use std::fs::File; use std::io; mod block; @@ -88,35 +87,12 @@ const INTERRUPT_STATUS_CONFIG_CHANGED: u32 = 0x2; pub enum ActivateError { EpollCtl(std::io::Error), BadActivate, - #[cfg(feature = "vsock")] - BadVhostActivate(self::vhost::Error), } pub type ActivateResult = std::result::Result<(), ActivateError>; pub type DeviceEventT = u16; -/// The payload is used to handle events where the internal state of the VirtIO device -/// needs to be changed. -#[allow(clippy::large_enum_variant)] -pub enum EpollHandlerPayload { - /// DrivePayload(disk_image) - DrivePayload(File), - /// Events that do not need a payload. - Empty, -} - -type Result = std::result::Result; - -pub trait EpollHandler: Send { - fn handle_event( - &mut self, - device_event: DeviceEventT, - event_flags: u32, - payload: EpollHandlerPayload, - ) -> Result<()>; -} - #[derive(Debug)] pub enum Error { FailedReadingQueue {