mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Make ConsoleConfig owned
Convert Path to PathBuf and remove the associated lifetime. Fixes #298 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
79a02f9171
commit
36137232f0
@@ -325,7 +325,7 @@ impl DeviceManager {
|
||||
|
||||
let serial_writer: Option<Box<dyn io::Write + Send>> = match vm_info.vm_cfg.serial.mode {
|
||||
ConsoleOutputMode::File => Some(Box::new(
|
||||
File::create(vm_info.vm_cfg.serial.file.unwrap())
|
||||
File::create(vm_info.vm_cfg.serial.file.as_ref().unwrap())
|
||||
.map_err(DeviceManagerError::SerialOutputFileOpen)?,
|
||||
)),
|
||||
ConsoleOutputMode::Tty => Some(Box::new(stdout())),
|
||||
@@ -386,7 +386,7 @@ impl DeviceManager {
|
||||
|
||||
let console_writer: Option<Box<dyn io::Write + Send>> = match vm_info.vm_cfg.console.mode {
|
||||
ConsoleOutputMode::File => Some(Box::new(
|
||||
File::create(vm_info.vm_cfg.console.file.unwrap())
|
||||
File::create(vm_info.vm_cfg.console.file.as_ref().unwrap())
|
||||
.map_err(DeviceManagerError::ConsoleOutputFileOpen)?,
|
||||
)),
|
||||
ConsoleOutputMode::Tty => Some(Box::new(stdout())),
|
||||
|
||||
Reference in New Issue
Block a user