Fix console-in parameter of run command
It should be File::open(), not File::create() because it's an input
Bug: N/A
Test: vm run-microdroid --console-in {a text file}
Change-Id: Ia52124a7eb44880298c39ae45f8be3908e12eb0d
diff --git a/vm/src/run.rs b/vm/src/run.rs
index 8721e71..6ac141d 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -269,7 +269,7 @@
};
let console_in =
if let Some(console_in_path) = console_in_path {
- Some(File::create(console_in_path).with_context(|| {
+ Some(File::open(console_in_path).with_context(|| {
format!("Failed to open console input file {:?}", console_in_path)
})?)
} else {