From d66fa942be3468309881075c0ea87fbbac4143a2 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 23 Jul 2020 17:13:41 +0100 Subject: [PATCH] virtio-devices: Implement AsRawFd for EpollHelper This is required for implementing virtio-net as the epoll RawFd must be assigned into the NetQueuePair. Signed-off-by: Rob Bradford --- virtio-devices/src/epoll_helper.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/virtio-devices/src/epoll_helper.rs b/virtio-devices/src/epoll_helper.rs index 71bbe25d2..0cf306aa9 100644 --- a/virtio-devices/src/epoll_helper.rs +++ b/virtio-devices/src/epoll_helper.rs @@ -132,3 +132,9 @@ impl EpollHelper { } } } + +impl AsRawFd for EpollHelper { + fn as_raw_fd(&self) -> RawFd { + self.epoll_file.as_raw_fd() + } +}