From a949ab21f742b8135199dd76988bae5b8d5e3ec5 Mon Sep 17 00:00:00 2001 From: Yang Zhong Date: Tue, 10 Sep 2019 19:52:36 +0800 Subject: [PATCH] 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 --- src/main.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main.rs b/src/main.rs index 4480f8155..1476d68e2 100755 --- a/src/main.rs +++ b/src/main.rs @@ -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=,\ + num_queues=,\ + queue_size=, \ + wce=\"", + ) + .takes_value(true) + .min_values(1), + ) .arg( Arg::with_name("v") .short("v") @@ -210,6 +222,9 @@ fn main() { let vhost_user_net: Option> = cmd_arguments .values_of("vhost-user-net") .map(|x| x.collect()); + let vhost_user_blk: Option> = cmd_arguments + .values_of("vhost-user-blk") + .map(|x| x.collect()); let vsock: Option> = 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,