bin: vhost_user_blk: Rename "--backend" to "--block-backend"

This will prevent it from conflicting when it is aggregated into the
cloud-hypervisor binary.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-20 14:28:06 +00:00
parent 032b8e4c1d
commit 3ede2dc53a
2 changed files with 5 additions and 5 deletions

View File

@ -284,10 +284,10 @@ fn main() {
.author(crate_authors!()) .author(crate_authors!())
.about("Launch a vhost-user-blk backend.") .about("Launch a vhost-user-blk backend.")
.arg( .arg(
Arg::with_name("backend") Arg::with_name("block-backend")
.long("backend") .long("block-backend")
.help( .help(
"Backend parameters \"image=<image_path>,\ "vhost-user-block backend parameters \"image=<image_path>,\
sock=<socket_path>,readonly=true|false,\ sock=<socket_path>,readonly=true|false,\
direct=true|false\"", direct=true|false\"",
) )
@ -296,7 +296,7 @@ fn main() {
) )
.get_matches(); .get_matches();
let vhost_user_blk_backend = cmd_arguments.value_of("backend").unwrap(); let vhost_user_blk_backend = cmd_arguments.value_of("block-backend").unwrap();
let backend_config = match VhostUserBlkBackendConfig::parse(vhost_user_blk_backend) { let backend_config = match VhostUserBlkBackendConfig::parse(vhost_user_blk_backend) {
Ok(config) => config, Ok(config) => config,

View File

@ -1822,7 +1822,7 @@ mod tests {
// Start the daemon // Start the daemon
let child = Command::new("target/release/vhost_user_blk") let child = Command::new("target/release/vhost_user_blk")
.args(&[ .args(&[
"--backend", "--block-backend",
format!( format!(
"image={},sock={},readonly={},direct={}", "image={},sock={},readonly={},direct={}",
blk_file_path, vubd_socket_path, rdonly, direct blk_file_path, vubd_socket_path, rdonly, direct