mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-20 15:01:16 +00:00
vm-virtio: Add error propagation for TAP listener (un)registration
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
3151b5d82a
commit
36d072e69c
@ -180,6 +180,8 @@ pub enum Error {
|
|||||||
event: DeviceEventT,
|
event: DeviceEventT,
|
||||||
},
|
},
|
||||||
IoError(io::Error),
|
IoError(io::Error),
|
||||||
|
RegisterListener(io::Error),
|
||||||
|
UnregisterListener(io::Error),
|
||||||
EpollCreateFd(io::Error),
|
EpollCreateFd(io::Error),
|
||||||
EpollCtl(io::Error),
|
EpollCtl(io::Error),
|
||||||
EpollWait(io::Error),
|
EpollWait(io::Error),
|
||||||
|
@ -84,7 +84,7 @@ impl NetEpollHandler {
|
|||||||
epoll::Events::EPOLLIN,
|
epoll::Events::EPOLLIN,
|
||||||
u64::from(RX_TAP_EVENT),
|
u64::from(RX_TAP_EVENT),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.map_err(DeviceError::UnregisterListener)?;
|
||||||
self.rx_tap_listening = false;
|
self.rx_tap_listening = false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -134,7 +134,7 @@ impl NetEpollHandler {
|
|||||||
epoll::Events::EPOLLIN,
|
epoll::Events::EPOLLIN,
|
||||||
u64::from(RX_TAP_EVENT),
|
u64::from(RX_TAP_EVENT),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.map_err(DeviceError::RegisterListener)?;
|
||||||
self.rx_tap_listening = true;
|
self.rx_tap_listening = true;
|
||||||
}
|
}
|
||||||
if self.rx.deferred_frame {
|
if self.rx.deferred_frame {
|
||||||
|
Loading…
Reference in New Issue
Block a user