main: Simplify error and return handling in start_vmm

Use a Result<> type with an error to simplify the code in start_vmm().
This will also make it easier to add cleanup funtionality.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-10-26 16:16:56 +00:00
parent dfd21cbfc5
commit c22b788b47
3 changed files with 51 additions and 55 deletions

2
Cargo.lock generated
View File

@@ -212,6 +212,7 @@ dependencies = [
name = "cloud-hypervisor"
version = "0.10.0"
dependencies = [
"anyhow",
"api_client",
"clap",
"credibility",
@@ -227,6 +228,7 @@ dependencies = [
"ssh2",
"tempdir",
"tempfile",
"thiserror",
"vhost_user_block",
"vhost_user_net",
"vmm",