vmm: Only resize virtio-console when attached to TTY

Fixes: #3092

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-09-08 15:04:49 +01:00 committed by Bo Chen
parent 0dbb2683e3
commit 951ad3495e

View File

@ -1755,7 +1755,12 @@ impl DeviceManager {
.unwrap()
.insert(id.clone(), device_node!(id, virtio_console_device));
Ok(Some(console_resizer))
// Only provide a resizer (for SIGWINCH handling) if the console is attached to the TTY
Ok(if matches!(console_config.mode, ConsoleOutputMode::Tty) {
Some(console_resizer)
} else {
None
})
}
fn add_console_device(