vmm: Move the tty setting to the VM start routine
We want to shrink the control loop to a bare minimal. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
2e9d815701
commit
e6ef9ece2c
1 changed files with 8 additions and 7 deletions
|
|
@ -851,13 +851,6 @@ impl Vm {
|
|||
let mut events = vec![epoll::Event::new(epoll::Events::empty(), 0); EPOLL_EVENTS_LEN];
|
||||
let epoll_fd = self.epoll.as_raw_fd();
|
||||
|
||||
if self.devices.console().input_enabled() && self.on_tty {
|
||||
io::stdin()
|
||||
.lock()
|
||||
.set_raw_mode()
|
||||
.map_err(Error::SetTerminalRaw)?;
|
||||
}
|
||||
|
||||
let exit_behaviour;
|
||||
|
||||
'outer: loop {
|
||||
|
|
@ -1044,7 +1037,15 @@ impl Vm {
|
|||
}
|
||||
Err(e) => error!("Signal not found {}", e),
|
||||
}
|
||||
|
||||
if self.on_tty {
|
||||
io::stdin()
|
||||
.lock()
|
||||
.set_raw_mode()
|
||||
.map_err(Error::SetTerminalRaw)?;
|
||||
}
|
||||
}
|
||||
|
||||
self.control_loop()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue