From bddaea6df176abc2c279fba24329a8dcda75d73b Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 30 Jan 2025 16:22:37 +0000 Subject: [PATCH] runtime-rs: Allow enable-vendor feature Clippy fails with: ``` error: unexpected `cfg` condition value: `enable-vendor` --> crates/hypervisor/src/device/driver/vfio.rs:180:11 | 180 | #[cfg(feature = "enable-vendor")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `ch-config`, `cloud-hypervisor`, `default`, and `dragonball` = help: consider adding `enable-vendor` as a feature in `Cargo.toml` ``` So add it as an expected cfg in the linter to skip this Signed-off-by: stevenhorsman --- src/runtime-rs/crates/hypervisor/Cargo.toml | 24 ++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/runtime-rs/crates/hypervisor/Cargo.toml b/src/runtime-rs/crates/hypervisor/Cargo.toml index 94972a0f5d..8d07866c41 100644 --- a/src/runtime-rs/crates/hypervisor/Cargo.toml +++ b/src/runtime-rs/crates/hypervisor/Cargo.toml @@ -46,15 +46,28 @@ safe-path = "0.1.0" crossbeam-channel = "0.5.6" tempdir = "0.3.7" -qapi = { version = "0.14", features = [ "qmp", "async-tokio-all" ] } +qapi = { version = "0.14", features = ["qmp", "async-tokio-all"] } qapi-spec = "0.3.1" qapi-qmp = "0.14.0" [target.'cfg(not(target_arch = "s390x"))'.dependencies] -dragonball = { path = "../../../dragonball", features = ["atomic-guest-memory", "virtio-vsock", "hotplug", "virtio-blk", "virtio-net", "virtio-fs", "vhost-net", "dbs-upcall", "virtio-mem", "virtio-balloon", "vhost-user-net", "host-device"], optional = true } +dragonball = { path = "../../../dragonball", features = [ + "atomic-guest-memory", + "virtio-vsock", + "hotplug", + "virtio-blk", + "virtio-net", + "virtio-fs", + "vhost-net", + "dbs-upcall", + "virtio-mem", + "virtio-balloon", + "vhost-user-net", + "host-device", +], optional = true } dbs-utils = { path = "../../../dragonball/src/dbs_utils" } hyperlocal = "0.8.0" -hyper = {version = "0.14.18", features = ["client"]} +hyper = { version = "0.14.18", features = ["client"] } [features] default = [] @@ -76,3 +89,8 @@ serial_test = "2.0.0" [build-dependencies] ttrpc-codegen = "0.4.2" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(feature, values("enable-vendor"))', +] }