diff --git a/capsules/extra/src/app_loader.rs b/capsules/extra/src/app_loader.rs index 67b6a212c5..50362fb433 100644 --- a/capsules/extra/src/app_loader.rs +++ b/capsules/extra/src/app_loader.rs @@ -57,6 +57,7 @@ use core::cmp; use kernel::dynamic_binary_storage; use kernel::grant::{AllowRoCount, AllowRwCount, Grant, UpcallCount}; +use kernel::process::ProcessLoadError; use kernel::processbuffer::ReadableProcessBuffer; use kernel::syscall::{CommandReturn, SyscallDriver}; use kernel::utilities::cells::{OptionalCell, TakeCell}; @@ -231,7 +232,7 @@ impl kernel::dynamic_binary_storage::DynamicBinaryStoreClient for AppLoader<'_> impl kernel::dynamic_binary_storage::DynamicProcessLoadClient for AppLoader<'_> { /// Let the requesting app know we are done loading the new process - fn load_done(&self) { + fn load_done(&self, _result: Result<(), ProcessLoadError>) { self.current_process.map(|processid| { let _ = self.apps.enter(processid, move |_app, kernel_data| { // Signal the app. diff --git a/kernel/src/dynamic_binary_storage.rs b/kernel/src/dynamic_binary_storage.rs index c0e30142d5..fed8f2a3bd 100644 --- a/kernel/src/dynamic_binary_storage.rs +++ b/kernel/src/dynamic_binary_storage.rs @@ -58,14 +58,9 @@ pub trait DynamicBinaryStore { /// in flash to store said process. /// /// Return value: - /// - `Ok((length, wait_for_setup))`: If there is a place to load the + /// - `Ok(length)`: If there is a place to load the /// process, the function will return `Ok()` with the size of the region - /// to store the process, and whether the process loader is waiting to set - /// up. This usually happens when we have to write a post pad app. The - /// client app is unable to write new app data until the process loader - /// finishes writing the padding app. So if tihs flag is set, then the - /// client app has to wait until the setup_done subscribe callback is - /// received. + /// to store the process. /// - `Err(ErrorCode)`: If there is nowhere to store the process a suitable /// `ErrorCode` will be returned. fn setup(&self, app_length: usize) -> Result; @@ -118,7 +113,7 @@ pub trait DynamicProcessLoad { /// The callback for dynamic binary flashing. pub trait DynamicProcessLoadClient { /// The new app has been loaded. - fn load_done(&self); + fn load_done(&self, result: Result<(), ProcessLoadError>); } /// Dynamic process loading machine. @@ -437,7 +432,7 @@ impl ProcessLoadingAsyncCl match result { Ok(()) => { self.load_client.map(|client| { - client.load_done(); + client.load_done(result); }); } Err(_e) => { @@ -449,7 +444,7 @@ impl ProcessLoadingAsyncCl } fn process_loading_finished(&self) { - debug!("Process Loaded"); + unimplemented!(); } }