chore(upgrade): upgrade to rust v1.97.1, bump deps and migrate, bump images (#95)

This commit is contained in:
2026-08-02 19:02:09 -07:00
committed by GitHub
parent aafda6e3da
commit 0e4452b625
14 changed files with 83 additions and 76 deletions

View File

@@ -49,7 +49,7 @@ fn reconnect() -> Result<()> {
for handle in handles.iter() {
// Ignore the result as there is nothing we can do if reconnecting a controller fails.
// This is also likely to fail in some cases but should fail safely.
let _ = uefi::boot::connect_controller(*handle, None, None, true);
let _ = uefi::boot::connect_controller(*handle, &[], None, true);
}
Ok(())

View File

@@ -44,16 +44,8 @@ fn read(input: &mut Input, timeout: &Duration) -> Result<MenuOperation> {
.context("unable to create timer event")?
};
// The timeout is in increments of 100 nanoseconds.
let timeout_hundred_nanos = timeout.as_nanos() / 100;
// Check if the timeout is too large to fit into an u64.
if timeout_hundred_nanos > u64::MAX as u128 {
bail!("timeout duration overflow");
}
// Set a timer to trigger after the specified duration.
let trigger = TimerTrigger::Relative(timeout_hundred_nanos as u64);
let trigger = TimerTrigger::Relative(*timeout);
uefi::boot::set_timer(&timer_event, trigger).context("unable to set timeout timer")?;
let mut events = vec![timer_event, key_event];

View File

@@ -1,5 +1,5 @@
use alloc::string::{String, ToString};
use anyhow::Result;
use anyhow::{Context, Result, anyhow};
use core::ptr::null_mut;
use jaarg::{
ErrorUsageWriter, ErrorUsageWriterContext, HelpWriter, HelpWriterContext, Opt, Opts,
@@ -131,11 +131,15 @@ impl SproutOptions {
) {
ParseResult::ContinueSuccess => Ok(result),
ParseResult::ExitSuccess => unsafe {
uefi::boot::exit(uefi::boot::image_handle(), Status::SUCCESS, 0, null_mut());
uefi::boot::exit(uefi::boot::image_handle(), Status::SUCCESS, 0, null_mut())
.context("unable to exit")?;
Err(anyhow!("unable to exit"))
},
ParseResult::ExitError => unsafe {
uefi::boot::exit(uefi::boot::image_handle(), Status::ABORTED, 0, null_mut());
uefi::boot::exit(uefi::boot::image_handle(), Status::ABORTED, 0, null_mut())
.context("unable to exit")?;
Err(anyhow!("unable to exit"))
},
}
}