vmm: Add support for multiple virtio-fs devices

Until now, the VMM was only accepting a single instance of a virtio-fs
device. This commit extend the virtio-fs support by allowing several
devices to be created for a single VM.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-06-27 09:14:11 -07:00
committed by Samuel Ortiz
parent 0fcca3ed74
commit 1cb2378499
3 changed files with 41 additions and 27 deletions

View File

@@ -74,7 +74,8 @@ fn main() {
sock=<socket_path>,num_queues=<number_of_queues>,\
queue_size=<size_of_each_queue>\"",
)
.takes_value(true),
.takes_value(true)
.min_values(1),
)
.get_matches();
@@ -98,7 +99,7 @@ fn main() {
// This .unwrap() cannot fail as there is a default value defined
let rng = cmd_arguments.value_of("rng").unwrap();
let fs = cmd_arguments.value_of("fs");
let fs: Option<Vec<&str>> = cmd_arguments.values_of("fs").map(|x| x.collect());
let vm_config = match config::VmConfig::parse(config::VmParams {
cpus,