mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: determine tty size in console
This prepares us to be able to handle console resizes in the console device's epoll loop, which we'll have to do if the output is a pty, since we won't get SIGWINCH from it. Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
committed by
Rob Bradford
parent
68e6a14deb
commit
28382a1491
+2
-5
@@ -17,9 +17,7 @@ use crate::config::{
|
||||
ConsoleOutputMode, DeviceConfig, DiskConfig, FsConfig, HotplugMethod, NetConfig, PmemConfig,
|
||||
UserDeviceConfig, ValidationError, VmConfig, VsockConfig,
|
||||
};
|
||||
use crate::device_manager::{
|
||||
self, get_win_size, Console, DeviceManager, DeviceManagerError, PtyPair,
|
||||
};
|
||||
use crate::device_manager::{self, Console, DeviceManager, DeviceManagerError, PtyPair};
|
||||
use crate::device_tree::DeviceTree;
|
||||
use crate::memory_manager::{Error as MemoryManagerError, MemoryManager};
|
||||
use crate::migration::{get_vm_snapshot, url_to_path, VM_SNAPSHOT_FILE};
|
||||
@@ -1602,8 +1600,7 @@ impl Vm {
|
||||
for signal in signals.forever() {
|
||||
match signal {
|
||||
SIGWINCH => {
|
||||
let (col, row) = get_win_size();
|
||||
console_input_clone.update_console_size(col, row);
|
||||
console_input_clone.update_console_size();
|
||||
}
|
||||
SIGTERM | SIGINT => {
|
||||
if on_tty {
|
||||
|
||||
Reference in New Issue
Block a user