vmm: Flag --disk should be optional

Now that cloud-hypervisor VMM supports virtio-pmem, it can directly
boot a VM from an image exposed as a persistent memory block device.

That's why there is no need to force the --disk option as being
mandatory.

Fixes #90

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-07-08 15:48:39 -07:00
committed by Samuel Ortiz
parent f0a76ad424
commit d9ce29117e
3 changed files with 48 additions and 43 deletions

View File

@@ -100,10 +100,7 @@ fn main() {
let cmdline = cmd_arguments.value_of("cmdline");
let disks: Vec<&str> = cmd_arguments
.values_of("disk")
.expect("Missing argument: disk. Provide at least one")
.collect();
let disks: Option<Vec<&str>> = cmd_arguments.values_of("disk").map(|x| x.collect());
let net: Option<Vec<&str>> = cmd_arguments.values_of("net").map(|x| x.collect());