mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 18:45:19 +00:00
vmm, vhost_user_block: Make parameter names match --disk
Make the --block-backend parameters match the --disk parameters. Fixes: #898 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
2f0bc06bec
commit
d5bfa2dfc8
@ -25,7 +25,7 @@ fn main() {
|
|||||||
.long("block-backend")
|
.long("block-backend")
|
||||||
.help(
|
.help(
|
||||||
"vhost-user-block backend parameters \
|
"vhost-user-block backend parameters \
|
||||||
\"image=<image_path>,sock=<socket_path>,num_queues=<number_of_queues>,\
|
\"path=<image_path>,socket=<socket_path>,num_queues=<number_of_queues>,\
|
||||||
readonly=true|false,direct=true|false,poll_queue=true|false\"",
|
readonly=true|false,direct=true|false,poll_queue=true|false\"",
|
||||||
)
|
)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
@ -249,7 +249,7 @@ fn create_app<'a, 'b>(
|
|||||||
.long("block-backend")
|
.long("block-backend")
|
||||||
.help(
|
.help(
|
||||||
"vhost-user-block backend parameters \
|
"vhost-user-block backend parameters \
|
||||||
\"image=<image_path>,sock=<socket_path>,num_queues=<number_of_queues>,\
|
\"path=<image_path>,socket=<socket_path>,num_queues=<number_of_queues>,\
|
||||||
readonly=true|false,direct=true|false,poll_queue=true|false\"",
|
readonly=true|false,direct=true|false,poll_queue=true|false\"",
|
||||||
)
|
)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
@ -398,7 +398,7 @@ mod tests {
|
|||||||
.args(&[
|
.args(&[
|
||||||
"--block-backend",
|
"--block-backend",
|
||||||
format!(
|
format!(
|
||||||
"image={},sock={},num_queues={},readonly={},direct={}",
|
"path={},socket={},num_queues={},readonly={},direct={}",
|
||||||
blk_file_path, vubd_socket_path, num_queues, rdonly, direct
|
blk_file_path, vubd_socket_path, num_queues, rdonly, direct
|
||||||
)
|
)
|
||||||
.as_str(),
|
.as_str(),
|
||||||
|
@ -387,10 +387,10 @@ impl<'a> VhostUserBlkBackendConfig<'a> {
|
|||||||
let mut poll_queue: bool = true;
|
let mut poll_queue: bool = true;
|
||||||
|
|
||||||
for param in params_list.iter() {
|
for param in params_list.iter() {
|
||||||
if param.starts_with("image=") {
|
if param.starts_with("path=") {
|
||||||
image = ¶m[6..];
|
image = ¶m[5..];
|
||||||
} else if param.starts_with("sock=") {
|
} else if param.starts_with("socket=") {
|
||||||
sock = ¶m[5..];
|
sock = ¶m[7..];
|
||||||
} else if param.starts_with("num_queues=") {
|
} else if param.starts_with("num_queues=") {
|
||||||
num_queues_str = ¶m[11..];
|
num_queues_str = ¶m[11..];
|
||||||
} else if param.starts_with("readonly=") {
|
} else if param.starts_with("readonly=") {
|
||||||
|
@ -1167,7 +1167,7 @@ impl DeviceManager {
|
|||||||
.args(&[
|
.args(&[
|
||||||
"--block-backend",
|
"--block-backend",
|
||||||
&format!(
|
&format!(
|
||||||
"image={},sock={},num_queues={},queue_size={}",
|
"path={},socket={},num_queues={},queue_size={}",
|
||||||
disk_cfg
|
disk_cfg
|
||||||
.path
|
.path
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user