Add "base" crate and transition crosvm usages to it from sys_util
For now, this crate simply re-exports all of sys_util, but it will
be updated to provide new interfaces when needed. This is the
first step to making crosvm not directly depend on sys_util, so
that we can make the interface changes we need without fear of
negatively affecting (i.e. completely breaking) other usages
within chromeos.
BUG=b:162363783
TEST=./build_test
Change-Id: I7d0aa3d8a1f66af1c7fee8fd649723ef17027150
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2325168
Tested-by: Michael Hoyle <mikehoyle@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
diff --git a/Cargo.lock b/Cargo.lock
index e24ce92..5d66c52 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5,6 +5,7 @@
version = "0.1.0"
dependencies = [
"arch 0.1.0",
+ "base 0.1.0",
"data_model 0.1.0",
"devices 0.1.0",
"kernel_cmdline 0.1.0",
@@ -15,7 +16,6 @@
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_control 0.1.0",
"vm_memory 0.1.0",
]
@@ -32,6 +32,7 @@
version = "0.1.0"
dependencies = [
"acpi_tables 0.1.0",
+ "base 0.1.0",
"devices 0.1.0",
"kernel_cmdline 0.1.0",
"kvm 0.1.0",
@@ -39,7 +40,6 @@
"minijail 0.2.1",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_control 0.1.0",
"vm_memory 0.1.0",
]
@@ -67,6 +67,13 @@
]
[[package]]
+name = "base"
+version = "0.1.0"
+dependencies = [
+ "sys_util 0.1.0",
+]
+
+[[package]]
name = "bit_field"
version = "0.1.0"
dependencies = [
@@ -109,12 +116,12 @@
name = "cros_async"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"io_uring 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"syscall_defines 0.1.0",
]
@@ -127,6 +134,7 @@
"arch 0.1.0",
"assertions 0.1.0",
"audio_streams 0.1.0",
+ "base 0.1.0",
"bit_field 0.1.0",
"crosvm_plugin 0.17.0",
"data_model 0.1.0",
@@ -151,7 +159,6 @@
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vhost 0.1.0",
"vm_control 0.1.0",
"vm_memory 0.1.0",
@@ -162,12 +169,12 @@
name = "crosvm_plugin"
version = "0.17.0"
dependencies = [
+ "base 0.1.0",
"kvm 0.1.0",
"kvm_sys 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"protos 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
@@ -184,6 +191,7 @@
dependencies = [
"acpi_tables 0.1.0",
"audio_streams 0.1.0",
+ "base 0.1.0",
"bit_field 0.1.0",
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cros_async 0.1.0",
@@ -211,7 +219,6 @@
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"syscall_defines 0.1.0",
"tempfile 3.0.7",
"tpm2 0.1.0",
@@ -228,6 +235,7 @@
version = "0.1.0"
dependencies = [
"async-trait 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "base 0.1.0",
"cros_async 0.1.0",
"data_model 0.1.0",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -235,7 +243,6 @@
"protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"protos 0.1.0",
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -342,28 +349,28 @@
name = "gpu_buffer"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
name = "gpu_display"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"linux_input_sys 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
name = "gpu_renderer"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -371,6 +378,7 @@
name = "hypervisor"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"bit_field 0.1.0",
"data_model 0.1.0",
"enumn 0.1.0",
@@ -379,7 +387,6 @@
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"msg_socket 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -387,8 +394,8 @@
name = "io_uring"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"syscall_defines 0.1.0",
]
@@ -403,8 +410,8 @@
name = "kernel_loader"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -412,12 +419,12 @@
name = "kvm"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
"kvm_sys 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"msg_socket 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -425,8 +432,8 @@
name = "kvm_sys"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
]
[[package]]
@@ -458,9 +465,9 @@
name = "linux_input_sys"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
]
[[package]]
@@ -505,30 +512,30 @@
name = "msg_socket"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"cros_async 0.1.0",
"data_model 0.1.0",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"msg_on_socket_derive 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
name = "net_sys"
version = "0.1.0"
dependencies = [
- "sys_util 0.1.0",
+ "base 0.1.0",
]
[[package]]
name = "net_util"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"net_sys 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
@@ -654,10 +661,10 @@
name = "qcow_utils"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"disk 0.1.0",
"getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
]
[[package]]
@@ -686,10 +693,10 @@
name = "resources"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"gpu_buffer 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"msg_socket 0.1.0",
- "sys_util 0.1.0",
]
[[package]]
@@ -763,7 +770,7 @@
name = "usb_sys"
version = "0.1.0"
dependencies = [
- "sys_util 0.1.0",
+ "base 0.1.0",
]
[[package]]
@@ -771,10 +778,10 @@
version = "0.1.0"
dependencies = [
"assertions 0.1.0",
+ "base 0.1.0",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"usb_sys 0.1.0",
]
@@ -782,7 +789,7 @@
name = "vfio_sys"
version = "0.1.0"
dependencies = [
- "sys_util 0.1.0",
+ "base 0.1.0",
]
[[package]]
@@ -790,9 +797,9 @@
version = "0.1.0"
dependencies = [
"assertions 0.1.0",
+ "base 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"net_util 0.1.0",
- "sys_util 0.1.0",
"virtio_sys 0.1.0",
"vm_memory 0.1.0",
]
@@ -801,20 +808,20 @@
name = "virtio_sys"
version = "0.1.0"
dependencies = [
- "sys_util 0.1.0",
+ "base 0.1.0",
]
[[package]]
name = "vm_control"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"data_model 0.1.0",
"kvm 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"msg_socket 0.1.0",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_memory 0.1.0",
]
@@ -822,10 +829,10 @@
name = "vm_memory"
version = "0.1.0"
dependencies = [
+ "base 0.1.0",
"cros_async 0.1.0",
"data_model 0.1.0",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
- "sys_util 0.1.0",
"syscall_defines 0.1.0",
]
@@ -845,6 +852,7 @@
"acpi_tables 0.1.0",
"arch 0.1.0",
"assertions 0.1.0",
+ "base 0.1.0",
"data_model 0.1.0",
"devices 0.1.0",
"kernel_cmdline 0.1.0",
@@ -856,7 +864,6 @@
"remain 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"resources 0.1.0",
"sync 0.1.0",
- "sys_util 0.1.0",
"vm_control 0.1.0",
"vm_memory 0.1.0",
]