[rialto] Refactor process_request API return type
To facilitate the separation of the requests module into a
standalone library, thereby enabling unit testing of the
request processing functionality.
Bug: 301068421
Test: atest rialto_test
Change-Id: I0e5b55decf0a431a5dabef34d257212d93d999e4
diff --git a/rialto/src/main.rs b/rialto/src/main.rs
index 43215a0..ebc16a9 100644
--- a/rialto/src/main.rs
+++ b/rialto/src/main.rs
@@ -28,6 +28,7 @@
use crate::communication::VsockStream;
use crate::error::{Error, Result};
use crate::fdt::read_dice_range_from;
+use crate::requests::process_request;
use alloc::boxed::Box;
use bssl_ffi::CRYPTO_library_init;
use ciborium_io::Write;
@@ -178,7 +179,7 @@
let mut vsock_stream = VsockStream::new(socket_device, host_addr())?;
while let ServiceVmRequest::Process(req) = vsock_stream.read_request()? {
- let response = requests::process_request(req, bcc_handover.as_ref())?;
+ let response = process_request(req, bcc_handover.as_ref());
vsock_stream.write_response(&response)?;
vsock_stream.flush()?;
}