main: add arguments entry for vhost-user-blk

To add vhost-user-blk support, it requires to add arguments
passed for it.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
This commit is contained in:
Yang Zhong 2019-09-10 19:52:36 +08:00 committed by Samuel Ortiz
parent 4164853ec6
commit a949ab21f7

View File

@ -175,6 +175,18 @@ fn main() {
.takes_value(true)
.min_values(1),
)
.arg(
Arg::with_name("vhost-user-blk")
.long("vhost-user-blk")
.help(
"Vhost user Block parameters \"sock=<socket_path>,\
num_queues=<number_of_queues>,\
queue_size=<size_of_each_queue>, \
wce=<true|false, default true>\"",
)
.takes_value(true)
.min_values(1),
)
.arg(
Arg::with_name("v")
.short("v")
@ -210,6 +222,9 @@ fn main() {
let vhost_user_net: Option<Vec<&str>> = cmd_arguments
.values_of("vhost-user-net")
.map(|x| x.collect());
let vhost_user_blk: Option<Vec<&str>> = cmd_arguments
.values_of("vhost-user-blk")
.map(|x| x.collect());
let vsock: Option<Vec<&str>> = cmd_arguments.values_of("vsock").map(|x| x.collect());
let log_level = match cmd_arguments.occurrences_of("v") {
@ -250,6 +265,7 @@ fn main() {
console,
devices,
vhost_user_net,
vhost_user_blk,
vsock,
}) {
Ok(config) => config,