fix crosvm deprecated cmdline arg warnings
Should have the same behavior.
Test: launch microdroid and check logcat
Change-Id: I7105ea119899119a005babc34b9b5100c5e14b89
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index a9a91fe..d9e80e2 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -1058,9 +1058,11 @@
}
for disk in &config.disks {
- command
- .arg(if disk.writable { "--rwdisk" } else { "--disk" })
- .arg(add_preserved_fd(&mut preserved_fds, &disk.image));
+ command.arg("--block").arg(format!(
+ "path={},ro={}",
+ add_preserved_fd(&mut preserved_fds, &disk.image),
+ !disk.writable,
+ ));
}
if let Some(kernel) = &config.kernel {