File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ use uefi::proto::device_path::DevicePath;
55use uefi:: { CString16 , Guid , guid} ;
66use uefi_raw:: table:: runtime:: { VariableAttributes , VariableVendor } ;
77
8+ /// The name of the bootloader to tell the system.
9+ const LOADER_NAME : & str = "Sprout" ;
10+
811/// Bootloader Interface support.
912pub struct BootloaderInterface ;
1013
@@ -30,6 +33,11 @@ impl BootloaderInterface {
3033 Self :: set_cstr16 ( key, & elapsed. as_micros ( ) . to_string ( ) )
3134 }
3235
36+ /// Tell the system what loader is being used.
37+ pub fn set_loader_info ( ) -> Result < ( ) > {
38+ Self :: set_cstr16 ( "LoaderInfo" , LOADER_NAME )
39+ }
40+
3341 /// Tell the system the relative path to the partition root of the current bootloader.
3442 pub fn set_loader_path ( path : & DevicePath ) -> Result < ( ) > {
3543 let subpath = device_path_subpath ( path) . context ( "unable to get loader path subpath" ) ?;
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ fn run() -> Result<()> {
7676 BootloaderInterface :: set_firmware_info ( )
7777 . context ( "unable to set firmware info in bootloader interface" ) ?;
7878
79+ // Tell the bootloader interface what loader is being used.
80+ BootloaderInterface :: set_loader_info ( )
81+ . context ( "unable to set loader info in bootloader interface" ) ?;
82+
7983 // Parse the options to the sprout executable.
8084 let options = SproutOptions :: parse ( ) . context ( "unable to parse options" ) ?;
8185
You can’t perform that action at this time.
0 commit comments