summary refs log tree commit diff
path: root/net_util
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2018-04-06 12:26:50 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-04-06 19:50:33 -0700
commit4fcd1af11ead83e11104e952a15582b6fc064d5b (patch)
treecef13045ef84cc73f1894547562c8a16f3541ab7 /net_util
parentd86e698ec800db139edee03a45140078850abfad (diff)
downloadcrosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar.gz
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar.bz2
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar.lz
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar.xz
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.tar.zst
crosvm-4fcd1af11ead83e11104e952a15582b6fc064d5b.zip
sys_util: remove deprecated Poller/Pollable interface
Now that there are no users of that interface, we should remove it.

TEST=./build_test
BUG=chromium:816692

Change-Id: Ifdbde22984f557b945e49559ba47076e99db923b
Reviewed-on: https://chromium-review.googlesource.com/1000103
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'net_util')
-rw-r--r--net_util/src/lib.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/net_util/src/lib.rs b/net_util/src/lib.rs
index ba7d507..273c1ca 100644
--- a/net_util/src/lib.rs
+++ b/net_util/src/lib.rs
@@ -18,7 +18,7 @@ use std::str::FromStr;
 
 use libc::EPERM;
 
-use sys_util::{Error as SysError, Pollable};
+use sys_util::{Error as SysError};
 use sys_util::{ioctl_with_val, ioctl_with_ref, ioctl_with_mut_ref};
 
 #[derive(Debug)]
@@ -160,7 +160,7 @@ pub struct Tap {
     if_name: [u8; 16usize],
 }
 
-pub trait TapT: Read + Write + AsRawFd + Pollable + Send + Sized {
+pub trait TapT: Read + Write + AsRawFd + Send + Sized {
     /// Create a new tap interface. Set the `vnet_hdr` flag to true to allow offloading on this tap,
     /// which will add an extra 12 byte virtio net header to incoming frames. Offloading cannot
     /// be used if `vnet_hdr` is false.
@@ -449,14 +449,6 @@ impl AsRawFd for Tap {
     }
 }
 
-// Safe since the tap fd's lifetime lasts as long as this trait object, and the
-// tap fd is pollable.
-unsafe impl Pollable for Tap {
-    fn pollable_fd(&self) -> RawFd {
-        self.tap_file.as_raw_fd()
-    }
-}
-
 pub mod fakes {
     use super::*;
     use std::fs::OpenOptions;
@@ -549,12 +541,6 @@ pub mod fakes {
             self.tap_file.as_raw_fd()
         }
     }
-
-    unsafe impl Pollable for FakeTap {
-        fn pollable_fd(&self) -> RawFd {
-            self.tap_file.as_raw_fd()
-        }
-    }
 }
 
 #[cfg(test)]