build: bump clap from 2.34.0 to 3.0.0

Bumps [clap](https://github.com/clap-rs/clap) from 2.34.0 to 3.0.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.34.0...clap_complete-v3.0.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
dependabot[bot] 2021-12-31 23:09:17 +00:00
parent 210a29f05c
commit 346bee48ad
9 changed files with 147 additions and 155 deletions

90
Cargo.lock generated
View File

@ -33,15 +33,6 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "ansi_term"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
"winapi",
]
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.52" version = "1.0.52"
@ -170,18 +161,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "2.34.0" version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9"
dependencies = [ dependencies = [
"ansi_term",
"atty", "atty",
"bitflags", "bitflags",
"indexmap",
"lazy_static",
"os_str_bytes",
"strsim", "strsim",
"term_size", "termcolor",
"terminal_size",
"textwrap", "textwrap",
"unicode-width",
"vec_map",
] ]
[[package]] [[package]]
@ -370,6 +362,12 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.20" version = "0.1.20"
@ -417,6 +415,16 @@ dependencies = [
"static_assertions", "static_assertions",
] ]
[[package]]
name = "indexmap"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]] [[package]]
name = "instant" name = "instant"
version = "0.1.12" version = "0.1.12"
@ -639,6 +647,15 @@ dependencies = [
name = "option_parser" name = "option_parser"
version = "0.1.0" version = "0.1.0"
[[package]]
name = "os_str_bytes"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
version = "0.11.2" version = "0.11.2"
@ -989,9 +1006,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.8.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "syn" name = "syn"
@ -1016,16 +1033,6 @@ dependencies = [
"unicode-xid", "unicode-xid",
] ]
[[package]]
name = "term_size"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "termcolor" name = "termcolor"
version = "1.1.2" version = "1.1.2"
@ -1035,6 +1042,16 @@ dependencies = [
"winapi-util", "winapi-util",
] ]
[[package]]
name = "terminal_size"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "test_infra" name = "test_infra"
version = "0.1.0" version = "0.1.0"
@ -1049,12 +1066,11 @@ dependencies = [
[[package]] [[package]]
name = "textwrap" name = "textwrap"
version = "0.11.0" version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
dependencies = [ dependencies = [
"term_size", "terminal_size",
"unicode-width",
] ]
[[package]] [[package]]
@ -1077,12 +1093,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.2" version = "0.2.2"
@ -1104,12 +1114,6 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]] [[package]]
name = "versionize" name = "versionize"
version = "0.1.6" version = "0.1.6"

View File

@ -15,7 +15,7 @@ lto = true
[dependencies] [dependencies]
anyhow = "1.0.52" anyhow = "1.0.52"
api_client = { path = "api_client" } api_client = { path = "api_client" }
clap = { version = "2.34.0", features = ["wrap_help"] } clap = { version = "3.0.0", features = ["wrap_help","cargo"] }
epoll = "4.3.1" epoll = "4.3.1"
event_monitor = { path = "event_monitor" } event_monitor = { path = "event_monitor" }
hypervisor = { path = "hypervisor" } hypervisor = { path = "hypervisor" }
@ -31,7 +31,7 @@ vmm-sys-util = "0.9.0"
vm-memory = "0.7.0" vm-memory = "0.7.0"
[build-dependencies] [build-dependencies]
clap = { version = "2.34.0", features = ["wrap_help"] } clap = { version = "3.0.0", features = ["wrap_help"] }
# List of patched crates # List of patched crates
[patch.crates-io] [patch.crates-io]

View File

@ -9,7 +9,7 @@ extern crate clap;
use api_client::simple_api_command; use api_client::simple_api_command;
use api_client::simple_api_command_with_fds; use api_client::simple_api_command_with_fds;
use api_client::Error as ApiClientError; use api_client::Error as ApiClientError;
use clap::{App, AppSettings, Arg, ArgMatches, SubCommand}; use clap::{App, AppSettings, Arg, ArgMatches};
use option_parser::{ByteSized, ByteSizedParseError}; use option_parser::{ByteSized, ByteSizedParseError};
use std::fmt; use std::fmt;
use std::os::unix::net::UnixStream; use std::os::unix::net::UnixStream;
@ -422,7 +422,7 @@ fn main() {
.setting(AppSettings::SubcommandRequired) .setting(AppSettings::SubcommandRequired)
.about("Remotely control a cloud-hypervisor VMM.") .about("Remotely control a cloud-hypervisor VMM.")
.arg( .arg(
Arg::with_name("api-socket") Arg::new("api-socket")
.long("api-socket") .long("api-socket")
.help("HTTP API socket path (UNIX domain socket).") .help("HTTP API socket path (UNIX domain socket).")
.takes_value(true) .takes_value(true)
@ -430,97 +430,89 @@ fn main() {
.required(true), .required(true),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-device") App::new("add-device").about("Add VFIO device").arg(
.about("Add VFIO device") Arg::new("device_config")
.arg( .index(1)
Arg::with_name("device_config") .help(vmm::config::DeviceConfig::SYNTAX),
.index(1) ),
.help(vmm::config::DeviceConfig::SYNTAX),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-disk") App::new("add-disk").about("Add block device").arg(
.about("Add block device") Arg::new("disk_config")
.arg( .index(1)
Arg::with_name("disk_config") .help(vmm::config::DiskConfig::SYNTAX),
.index(1) ),
.help(vmm::config::DiskConfig::SYNTAX),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-fs") App::new("add-fs")
.about("Add virtio-fs backed fs device") .about("Add virtio-fs backed fs device")
.arg( .arg(
Arg::with_name("fs_config") Arg::new("fs_config")
.index(1) .index(1)
.help(vmm::config::FsConfig::SYNTAX), .help(vmm::config::FsConfig::SYNTAX),
), ),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-pmem") App::new("add-pmem")
.about("Add persistent memory device") .about("Add persistent memory device")
.arg( .arg(
Arg::with_name("pmem_config") Arg::new("pmem_config")
.index(1) .index(1)
.help(vmm::config::PmemConfig::SYNTAX), .help(vmm::config::PmemConfig::SYNTAX),
), ),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-net") App::new("add-net").about("Add network device").arg(
.about("Add network device") Arg::new("net_config")
.arg( .index(1)
Arg::with_name("net_config") .help(vmm::config::NetConfig::SYNTAX),
.index(1) ),
.help(vmm::config::NetConfig::SYNTAX),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-user-device") App::new("add-user-device")
.about("Add userspace device") .about("Add userspace device")
.arg( .arg(
Arg::with_name("device_config") Arg::new("device_config")
.index(1) .index(1)
.help(vmm::config::UserDeviceConfig::SYNTAX), .help(vmm::config::UserDeviceConfig::SYNTAX),
), ),
) )
.subcommand( .subcommand(
SubCommand::with_name("add-vsock") App::new("add-vsock").about("Add vsock device").arg(
.about("Add vsock device") Arg::new("vsock_config")
.arg( .index(1)
Arg::with_name("vsock_config") .help(vmm::config::VsockConfig::SYNTAX),
.index(1) ),
.help(vmm::config::VsockConfig::SYNTAX),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("remove-device") App::new("remove-device")
.about("Remove VFIO device") .about("Remove VFIO device")
.arg(Arg::with_name("id").index(1).help("<device_id>")), .arg(Arg::new("id").index(1).help("<device_id>")),
) )
.subcommand(SubCommand::with_name("info").about("Info on the VM")) .subcommand(App::new("info").about("Info on the VM"))
.subcommand(SubCommand::with_name("counters").about("Counters from the VM")) .subcommand(App::new("counters").about("Counters from the VM"))
.subcommand(SubCommand::with_name("pause").about("Pause the VM")) .subcommand(App::new("pause").about("Pause the VM"))
.subcommand(SubCommand::with_name("reboot").about("Reboot the VM")) .subcommand(App::new("reboot").about("Reboot the VM"))
.subcommand(SubCommand::with_name("power-button").about("Trigger a power button in the VM")) .subcommand(App::new("power-button").about("Trigger a power button in the VM"))
.subcommand( .subcommand(
SubCommand::with_name("resize") App::new("resize")
.about("Resize the VM") .about("Resize the VM")
.arg( .arg(
Arg::with_name("cpus") Arg::new("cpus")
.long("cpus") .long("cpus")
.help("New vCPUs count") .help("New vCPUs count")
.takes_value(true) .takes_value(true)
.number_of_values(1), .number_of_values(1),
) )
.arg( .arg(
Arg::with_name("memory") Arg::new("memory")
.long("memory") .long("memory")
.help("New memory size in bytes (supports K/M/G suffix)") .help("New memory size in bytes (supports K/M/G suffix)")
.takes_value(true) .takes_value(true)
.number_of_values(1), .number_of_values(1),
) )
.arg( .arg(
Arg::with_name("balloon") Arg::new("balloon")
.long("balloon") .long("balloon")
.help("New balloon size in bytes (supports K/M/G suffix)") .help("New balloon size in bytes (supports K/M/G suffix)")
.takes_value(true) .takes_value(true)
@ -528,57 +520,53 @@ fn main() {
), ),
) )
.subcommand( .subcommand(
SubCommand::with_name("resize-zone") App::new("resize-zone")
.about("Resize a memory zone") .about("Resize a memory zone")
.arg( .arg(
Arg::with_name("id") Arg::new("id")
.long("id") .long("id")
.help("Memory zone identifier") .help("Memory zone identifier")
.takes_value(true) .takes_value(true)
.number_of_values(1), .number_of_values(1),
) )
.arg( .arg(
Arg::with_name("size") Arg::new("size")
.long("size") .long("size")
.help("New memory zone size in bytes (supports K/M/G suffix)") .help("New memory zone size in bytes (supports K/M/G suffix)")
.takes_value(true) .takes_value(true)
.number_of_values(1), .number_of_values(1),
), ),
) )
.subcommand(SubCommand::with_name("resume").about("Resume the VM")) .subcommand(App::new("resume").about("Resume the VM"))
.subcommand(SubCommand::with_name("shutdown").about("Shutdown the VM")) .subcommand(App::new("shutdown").about("Shutdown the VM"))
.subcommand( .subcommand(
SubCommand::with_name("snapshot") App::new("snapshot").about("Create a snapshot from VM").arg(
.about("Create a snapshot from VM") Arg::new("snapshot_config")
.arg( .index(1)
Arg::with_name("snapshot_config") .help("<destination_url>"),
.index(1) ),
.help("<destination_url>"),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("restore") App::new("restore").about("Restore VM from a snapshot").arg(
.about("Restore VM from a snapshot") Arg::new("restore_config")
.arg( .index(1)
Arg::with_name("restore_config") .help(vmm::config::RestoreConfig::SYNTAX),
.index(1) ),
.help(vmm::config::RestoreConfig::SYNTAX),
),
) )
.subcommand( .subcommand(
SubCommand::with_name("send-migration") App::new("send-migration")
.about("Initiate a VM migration") .about("Initiate a VM migration")
.arg( .arg(
Arg::with_name("send_migration_config") Arg::new("send_migration_config")
.index(1) .index(1)
.help("<destination_url>"), .help("<destination_url>"),
), ),
) )
.subcommand( .subcommand(
SubCommand::with_name("receive-migration") App::new("receive-migration")
.about("Receive a VM migration") .about("Receive a VM migration")
.arg( .arg(
Arg::with_name("receive_migration_config") Arg::new("receive_migration_config")
.index(1) .index(1)
.help("<receiver_url>"), .help("<receiver_url>"),
), ),

View File

@ -125,11 +125,11 @@ fn prepare_default_values() -> (String, String, String) {
(default_vcpus, default_memory, default_rng) (default_vcpus, default_memory, default_rng)
} }
fn create_app<'a, 'b>( fn create_app<'a>(
default_vcpus: &'a str, default_vcpus: &'a str,
default_memory: &'a str, default_memory: &'a str,
default_rng: &'a str, default_rng: &'a str,
) -> App<'a, 'b> { ) -> App<'a> {
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
let mut app: App; let mut app: App;
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
@ -141,11 +141,11 @@ fn create_app<'a, 'b>(
.version(env!("BUILT_VERSION")) .version(env!("BUILT_VERSION"))
.author(crate_authors!()) .author(crate_authors!())
.about("Launch a cloud-hypervisor VMM.") .about("Launch a cloud-hypervisor VMM.")
.group(ArgGroup::with_name("vm-config").multiple(true)) .group(ArgGroup::new("vm-config").multiple(true))
.group(ArgGroup::with_name("vmm-config").multiple(true)) .group(ArgGroup::new("vmm-config").multiple(true))
.group(ArgGroup::with_name("logging").multiple(true)) .group(ArgGroup::new("logging").multiple(true))
.arg( .arg(
Arg::with_name("cpus") Arg::new("cpus")
.long("cpus") .long("cpus")
.help( .help(
"boot=<boot_vcpus>,max=<max_vcpus>,\ "boot=<boot_vcpus>,max=<max_vcpus>,\
@ -157,7 +157,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("platform") Arg::new("platform")
.long("platform") .long("platform")
.help( .help(
"num_pci_segments=<num pci segments>", "num_pci_segments=<num pci segments>",
@ -166,7 +166,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("memory") Arg::new("memory")
.long("memory") .long("memory")
.help( .help(
"Memory parameters \ "Memory parameters \
@ -181,7 +181,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("memory-zone") Arg::new("memory-zone")
.long("memory-zone") .long("memory-zone")
.help( .help(
"User defined memory zone parameters \ "User defined memory zone parameters \
@ -198,7 +198,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("kernel") Arg::new("kernel")
.long("kernel") .long("kernel")
.help( .help(
"Path to loaded kernel. This may be a kernel or firmware that supports a PVH \ "Path to loaded kernel. This may be a kernel or firmware that supports a PVH \
@ -208,21 +208,21 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("initramfs") Arg::new("initramfs")
.long("initramfs") .long("initramfs")
.help("Path to initramfs image") .help("Path to initramfs image")
.takes_value(true) .takes_value(true)
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("cmdline") Arg::new("cmdline")
.long("cmdline") .long("cmdline")
.help("Kernel command line") .help("Kernel command line")
.takes_value(true) .takes_value(true)
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("disk") Arg::new("disk")
.long("disk") .long("disk")
.help(config::DiskConfig::SYNTAX) .help(config::DiskConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -230,7 +230,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("net") Arg::new("net")
.long("net") .long("net")
.help(config::NetConfig::SYNTAX) .help(config::NetConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -238,7 +238,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("rng") Arg::new("rng")
.long("rng") .long("rng")
.help( .help(
"Random number generator parameters \"src=<entropy_source_path>,iommu=on|off\"", "Random number generator parameters \"src=<entropy_source_path>,iommu=on|off\"",
@ -247,14 +247,14 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("balloon") Arg::new("balloon")
.long("balloon") .long("balloon")
.help(config::BalloonConfig::SYNTAX) .help(config::BalloonConfig::SYNTAX)
.takes_value(true) .takes_value(true)
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("fs") Arg::new("fs")
.long("fs") .long("fs")
.help(config::FsConfig::SYNTAX) .help(config::FsConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -262,7 +262,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("pmem") Arg::new("pmem")
.long("pmem") .long("pmem")
.help(config::PmemConfig::SYNTAX) .help(config::PmemConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -270,14 +270,14 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("serial") Arg::new("serial")
.long("serial") .long("serial")
.help("Control serial port: off|null|pty|tty|file=/path/to/a/file") .help("Control serial port: off|null|pty|tty|file=/path/to/a/file")
.default_value("null") .default_value("null")
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("console") Arg::new("console")
.long("console") .long("console")
.help( .help(
"Control (virtio) console: \"off|null|pty|tty|file=/path/to/a/file,iommu=on|off\"", "Control (virtio) console: \"off|null|pty|tty|file=/path/to/a/file,iommu=on|off\"",
@ -286,7 +286,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("device") Arg::new("device")
.long("device") .long("device")
.help(config::DeviceConfig::SYNTAX) .help(config::DeviceConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -294,7 +294,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("user-device") Arg::new("user-device")
.long("user-device") .long("user-device")
.help(config::UserDeviceConfig::SYNTAX) .help(config::UserDeviceConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -302,7 +302,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("vsock") Arg::new("vsock")
.long("vsock") .long("vsock")
.help(config::VsockConfig::SYNTAX) .help(config::VsockConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -310,7 +310,7 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("numa") Arg::new("numa")
.long("numa") .long("numa")
.help(config::NumaConfig::SYNTAX) .help(config::NumaConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -318,21 +318,21 @@ fn create_app<'a, 'b>(
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("watchdog") Arg::new("watchdog")
.long("watchdog") .long("watchdog")
.help("Enable virtio-watchdog") .help("Enable virtio-watchdog")
.takes_value(false) .takes_value(false)
.group("vm-config"), .group("vm-config"),
) )
.arg( .arg(
Arg::with_name("v") Arg::new("v")
.short("v") .short('v')
.multiple(true) .multiple_occurrences(true)
.help("Sets the level of debugging output") .help("Sets the level of debugging output")
.group("logging"), .group("logging"),
) )
.arg( .arg(
Arg::with_name("log-file") Arg::new("log-file")
.long("log-file") .long("log-file")
.help("Log file. Standard error is used if not specified") .help("Log file. Standard error is used if not specified")
.takes_value(true) .takes_value(true)
@ -340,7 +340,7 @@ fn create_app<'a, 'b>(
.group("logging"), .group("logging"),
) )
.arg( .arg(
Arg::with_name("api-socket") Arg::new("api-socket")
.long("api-socket") .long("api-socket")
.help("HTTP API socket (UNIX domain socket): path=</path/to/a/file> or fd=<fd>.") .help("HTTP API socket (UNIX domain socket): path=</path/to/a/file> or fd=<fd>.")
.takes_value(true) .takes_value(true)
@ -348,7 +348,7 @@ fn create_app<'a, 'b>(
.group("vmm-config"), .group("vmm-config"),
) )
.arg( .arg(
Arg::with_name("event-monitor") Arg::new("event-monitor")
.long("event-monitor") .long("event-monitor")
.help("File to report events on: path=</path/to/a/file> or fd=<fd>") .help("File to report events on: path=</path/to/a/file> or fd=<fd>")
.takes_value(true) .takes_value(true)
@ -356,7 +356,7 @@ fn create_app<'a, 'b>(
.group("vmm-config"), .group("vmm-config"),
) )
.arg( .arg(
Arg::with_name("restore") Arg::new("restore")
.long("restore") .long("restore")
.help(config::RestoreConfig::SYNTAX) .help(config::RestoreConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -364,7 +364,7 @@ fn create_app<'a, 'b>(
.group("vmm-config"), .group("vmm-config"),
) )
.arg( .arg(
Arg::with_name("seccomp") Arg::new("seccomp")
.long("seccomp") .long("seccomp")
.takes_value(true) .takes_value(true)
.possible_values(&["true", "false", "log"]) .possible_values(&["true", "false", "log"])
@ -374,7 +374,7 @@ fn create_app<'a, 'b>(
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
{ {
app = app.arg( app = app.arg(
Arg::with_name("sgx-epc") Arg::new("sgx-epc")
.long("sgx-epc") .long("sgx-epc")
.help(config::SgxEpcConfig::SYNTAX) .help(config::SgxEpcConfig::SYNTAX)
.takes_value(true) .takes_value(true)
@ -386,7 +386,7 @@ fn create_app<'a, 'b>(
#[cfg(feature = "tdx")] #[cfg(feature = "tdx")]
{ {
app = app.arg( app = app.arg(
Arg::with_name("tdx") Arg::new("tdx")
.long("tdx") .long("tdx")
.help("TDX Support: firmware=<tdvf path>") .help("TDX Support: firmware=<tdvf path>")
.takes_value(true) .takes_value(true)

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
block_util = { path = "../block_util" } block_util = { path = "../block_util" }
clap = { version = "2.34.0", features = ["wrap_help"] } clap = { version = "3.0.0", features = ["wrap_help"] }
env_logger = "0.9.0" env_logger = "0.9.0"
epoll = "4.3.1" epoll = "4.3.1"
libc = "0.2.112" libc = "0.2.112"

View File

@ -23,7 +23,7 @@ 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("block-backend") Arg::new("block-backend")
.long("block-backend") .long("block-backend")
.help(vhost_user_block::SYNTAX) .help(vhost_user_block::SYNTAX)
.takes_value(true) .takes_value(true)

View File

@ -5,7 +5,7 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
clap = { version = "2.34.0", features = ["wrap_help"] } clap = { version = "3.0.0", features = ["wrap_help"] }
env_logger = "0.9.0" env_logger = "0.9.0"
epoll = "4.3.1" epoll = "4.3.1"
libc = "0.2.112" libc = "0.2.112"

View File

@ -20,7 +20,7 @@ fn main() {
.author(crate_authors!()) .author(crate_authors!())
.about("Launch a vhost-user-net backend.") .about("Launch a vhost-user-net backend.")
.arg( .arg(
Arg::with_name("net-backend") Arg::new("net-backend")
.long("net-backend") .long("net-backend")
.help(vhost_user_net::SYNTAX) .help(vhost_user_net::SYNTAX)
.takes_value(true) .takes_value(true)

View File

@ -20,7 +20,7 @@ arc-swap = "1.5.0"
arch = { path = "../arch" } arch = { path = "../arch" }
bitflags = "1.3.2" bitflags = "1.3.2"
block_util = { path = "../block_util" } block_util = { path = "../block_util" }
clap = "2.34.0" clap = "3.0.0"
devices = { path = "../devices" } devices = { path = "../devices" }
epoll = "4.3.1" epoll = "4.3.1"
event_monitor = { path = "../event_monitor" } event_monitor = { path = "../event_monitor" }