Revert "vm tool: rename --gki arg to more generic --os one"
Revert submission 3323102
Reason for revert: DroidMonitor: Potential culprit for http://b/376483022 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:3323102
Change-Id: Id2923b891929dd695821da09a116a95d16ef8372
diff --git a/android/vm/src/main.rs b/android/vm/src/main.rs
index 110e0ca..81ca8fa 100644
--- a/android/vm/src/main.rs
+++ b/android/vm/src/main.rs
@@ -155,10 +155,10 @@
#[arg(long)]
devices: Vec<PathBuf>,
- /// Version of OS to use. If not set, defaults to microdroid.
- /// You can list all available OSes via `vm info` command.
+ /// Version of GKI to use. If set, use instead of microdroid kernel
+ #[cfg(vendor_modules)]
#[arg(long)]
- os: Option<String>,
+ gki: Option<String>,
}
impl MicrodroidConfig {
@@ -172,6 +172,16 @@
}
}
+ fn gki(&self) -> Option<&str> {
+ cfg_if::cfg_if! {
+ if #[cfg(vendor_modules)] {
+ self.gki.as_deref()
+ } else {
+ None
+ }
+ }
+ }
+
fn devices(&self) -> &[PathBuf] {
cfg_if::cfg_if! {
if #[cfg(device_assignment)] {