arch: acpi: Only add ACPI COM1 device if serial is turned on

Only add the ACPI PNP device for the COM1 serial port if it is not
turned off with "--serial off"

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-08-22 11:18:48 +01:00
committed by Samuel Ortiz
parent 15387cd96a
commit 2610f4353d
4 changed files with 19 additions and 10 deletions

View File

@@ -1634,6 +1634,7 @@ impl<'a> Vm<'a> {
cmdline_cstring.to_bytes().len() + 1,
vcpu_count,
Some(hdr),
self.config.serial.mode != ConsoleOutputMode::Off,
)
.map_err(|_| Error::CmdLine)?;
@@ -1652,6 +1653,7 @@ impl<'a> Vm<'a> {
cmdline_cstring.to_bytes().len() + 1,
vcpu_count,
None,
self.config.serial.mode != ConsoleOutputMode::Off,
)
.map_err(|_| Error::CmdLine)?;