mirror of
https://github.com/edera-dev/sprout.git
synced 2026-05-08 03:10:18 +00:00
feat(boot): clear screen before boot handoff, if --retain-boot-console is not specified on the command-line (#51)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::context::SproutContext;
|
||||
use crate::phases::before_handoff;
|
||||
use crate::utils;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::rc::Rc;
|
||||
@@ -88,6 +89,10 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
||||
BootloaderInterface::mark_exec(context.root().timer())
|
||||
.context("unable to mark execution of boot entry in bootloader interface")?;
|
||||
|
||||
// Since we are about to hand off control to another image, we need to execute the handoff hook.
|
||||
// This will perform operations like clearing the screen.
|
||||
before_handoff(&context).context("unable to execute before handoff hook")?;
|
||||
|
||||
// Start the loaded image.
|
||||
// This call might return, or it may pass full control to another image that will never return.
|
||||
// Capture the result to ensure we can return an error if the image fails to start, but only
|
||||
|
||||
Reference in New Issue
Block a user