mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 02:02:52 +00:00
crosvm: migrate to Rust 2021 edition
BUG=none TEST=cq Change-Id: I0059c970879b78bfd40b6ce58b10debcf154b50f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508322 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Anton Romanov <romanton@google.com>
This commit is contained in:
parent
6fd8926373
commit
bed40ad547
59 changed files with 63 additions and 70 deletions
|
@ -2,7 +2,7 @@
|
|||
name = "crosvm"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
default-run = "crosvm"
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "aarch64"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
arch = { path = "../arch" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "acpi_tables"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../common/data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "arch"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
power-monitor-powerd = ["power_monitor/powerd"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "bit_field"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bit_field_derive = { path = "bit_field_derive" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "bit_field_derive"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = "^1"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "assertions"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[workspace]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "audio_streams"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/audio_streams.rs"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "balloon_control"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1", features = [ "derive" ] }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "base"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
chromeos = ["sys_util/chromeos"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "cros_fuzz"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["Cargo.toml", "src/*.rs"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "cros_async"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.36"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cros_async"
|
||||
version = "0.2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
uring = ["io-uring"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "data_model"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "io_uring"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../data_model" } # provided by ebuild
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "p9"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "p9-fuzz"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
p9 = { path = "../" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "sync"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[workspace]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "sys_util"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -549,19 +549,12 @@ unsafe impl<T> Killable for JoinHandle<T> {
|
|||
|
||||
/// Treat some errno's as Ok(()).
|
||||
macro_rules! ok_if {
|
||||
($result:expr, $($errno:pat)|+) => {{
|
||||
let res = $result;
|
||||
match res {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => {
|
||||
if matches!(err.errno(), $($errno)|+) {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(err)
|
||||
}
|
||||
($result:expr, $errno:pat) => {{
|
||||
match $result {
|
||||
Err(err) if !matches!(err.errno(), $errno) => Err(err),
|
||||
_ => Ok(()),
|
||||
}
|
||||
}
|
||||
}}
|
||||
}};
|
||||
}
|
||||
|
||||
/// Terminates and reaps a child process. If the child process is a group leader, its children will
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "sys_util_core"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "poll_token_derive"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["*.rs", "Cargo.toml"]
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "crosvm-fuzz"
|
||||
version = "0.0.1"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
cros_fuzz = "*"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "crosvm_control"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "crosvm_plugin"
|
||||
version = "0.17.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
stats = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "devices"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
audio = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "disk"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/disk.rs"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "fuse"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "gpu_display"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
x = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "hypervisor"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bit_field = { path = "../bit_field" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "integration_tests"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "kernel_cmdline"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "kernel_loader"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../common/data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "kvm"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../common/data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "kvm_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../common/data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "libcras"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/libcras.rs"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "libvda"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
links = "vda"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "linux_input_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../common/data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "net_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
base = { path = "../common/base" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "net_util"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "power_monitor"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
powerd = ["dbus", "protobuf", "protoc-rust"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "protos"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
plugin = ["kvm_sys"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "qcow_utils"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/qcow_utils.rs"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "resources"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "rutabaga_gfx"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
gfxstream = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "rutabaga_gfx_ffi"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors + Android Open Source Project"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "rutabaga_gfx_ffi"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "gpu_buffer"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
data_model = { path = "../data_model" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "system_api"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
path = "src/system_api.rs"
|
||||
|
|
2
third_party/vmm_vhost/Cargo.toml
vendored
2
third_party/vmm_vhost/Cargo.toml
vendored
|
@ -8,7 +8,7 @@ repository = "https://github.com/rust-vmm/vhost"
|
|||
documentation = "https://docs.rs/vhost"
|
||||
readme = "README.md"
|
||||
license = "Apache-2.0 or BSD-3-Clause"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "tpm2-sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
links = "tpm2"
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "tpm2"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tpm2-sys = { path = "../tpm2-sys" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "usb_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
base = { path = "../common/base" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "usb_util"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
assertions = { path = "../common/assertions" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "vfio_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
base = { path = "../common/base" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "vhost"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
assertions = { path = "../common/assertions" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "virtio_sys"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
base = { path = "../common/base" }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "vm_control"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
gdb = ["gdbstub_arch"]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "vm_memory"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = ["src/**/*", "Cargo.toml"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "x86_64"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
gdb = ["gdbstub_arch", "arch/gdb"]
|
||||
|
|
Loading…
Reference in a new issue