mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
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:
parent
4164853ec6
commit
a949ab21f7
16
src/main.rs
16
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=<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,
|
||||
|
Loading…
Reference in New Issue
Block a user