mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 20:20:17 +00:00
begin documenting some functions and align error messages
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
use anyhow::{Context, Result};
|
||||
use std::os::uefi as uefi_std;
|
||||
|
||||
/// Initializes the UEFI environment.
|
||||
///
|
||||
/// This fetches the system table and current image handle from uefi_std and injects
|
||||
/// them into the uefi crate.
|
||||
pub fn init() -> Result<()> {
|
||||
let system_table = uefi_std::env::system_table();
|
||||
let image_handle = uefi_std::env::image_handle();
|
||||
@@ -15,6 +19,6 @@ pub fn init() -> Result<()> {
|
||||
uefi::boot::set_image_handle(handle);
|
||||
}
|
||||
|
||||
uefi::helpers::init().context("failed to initialize uefi")?;
|
||||
uefi::helpers::init().context("unable to initialize uefi")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user