mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: update serial manager epoll events size
I've moved this so that it's just after the enum definition, which
will hopefully make it less easy to miss if events are added/removed
again in future.
Fixes: 6d1077fc ("vmm: Unix socket backend for serial port")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
committed by
Rob Bradford
parent
e810be62cd
commit
938ff2eeb7
@@ -92,6 +92,7 @@ pub enum EpollDispatch {
|
|||||||
Socket = 2,
|
Socket = 2,
|
||||||
Unknown,
|
Unknown,
|
||||||
}
|
}
|
||||||
|
const EPOLL_EVENTS_LEN: usize = 4;
|
||||||
|
|
||||||
impl From<u64> for EpollDispatch {
|
impl From<u64> for EpollDispatch {
|
||||||
fn from(v: u64) -> Self {
|
fn from(v: u64) -> Self {
|
||||||
@@ -291,9 +292,6 @@ impl SerialManager {
|
|||||||
.name("serial-manager".to_string())
|
.name("serial-manager".to_string())
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
std::panic::catch_unwind(AssertUnwindSafe(move || {
|
std::panic::catch_unwind(AssertUnwindSafe(move || {
|
||||||
// 3 for File, Kill, and Unknown
|
|
||||||
const EPOLL_EVENTS_LEN: usize = 3;
|
|
||||||
|
|
||||||
let mut events =
|
let mut events =
|
||||||
[epoll::Event::new(epoll::Events::empty(), 0); EPOLL_EVENTS_LEN];
|
[epoll::Event::new(epoll::Events::empty(), 0); EPOLL_EVENTS_LEN];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user