Remove onPayloadStdio
Mostly this is removing the onPayloadStdio callback and everything
associated with it in the Java & Native APIs, and removing the
implementation, thereby reverting much of
commit 451cc9680119f40c0deeb52e74c776055c5bd2db.
Slightly randomly, ensure all our native API functions enable logging.
Bug: 253221932
Bug: 243512115
Test: atest ComposHostTestCases MicrodroidTests
Change-Id: Ib7d1491e264539ffcc40442fdf419ce50d8cecf5
diff --git a/vm/src/run.rs b/vm/src/run.rs
index 7cd5a19..1f0433d 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -27,7 +27,7 @@
use binder::ParcelFileDescriptor;
use microdroid_payload_config::VmPayloadConfig;
use std::fs::File;
-use std::io::{self, BufRead, BufReader};
+use std::io;
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::path::{Path, PathBuf};
use vmclient::{ErrorCode, VmInstance};
@@ -280,20 +280,6 @@
eprintln!("payload started");
}
- fn on_payload_stdio(&self, _cid: i32, stream: &File) {
- eprintln!("connecting payload stdio...");
- // Show the output of the payload
- let mut reader = BufReader::new(stream.try_clone().unwrap());
- std::thread::spawn(move || loop {
- let mut s = String::new();
- match reader.read_line(&mut s) {
- Ok(0) => break,
- Ok(_) => print!("{}", s),
- Err(e) => eprintln!("error reading from virtual machine: {}", e),
- };
- });
- }
-
fn on_payload_ready(&self, _cid: i32) {
eprintln!("payload is ready");
}