runtime-rs: ch: Honour debug setting

Enable Cloud Hypervisor debug based on the specified configuration
rather than hard-coding debug to be disabled.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2023-03-08 15:47:54 +00:00
parent e3c2d727ba
commit 96555186b3

View File

@ -229,7 +229,13 @@ impl CloudHypervisorInner {
async fn cloud_hypervisor_launch(&mut self, _timeout_secs: i32) -> Result<()> {
self.cloud_hypervisor_ensure_not_launched().await?;
let debug = false;
let cfg = self
.config
.as_ref()
.ok_or("no hypervisor config for CH")
.map_err(|e| anyhow!(e))?;
let debug = cfg.debug_info.enable_debug;
let disable_seccomp = true;