Skip to content

Commit

Permalink
orb-slot-ctrl: ensure retry counter is reset when switching slot
Browse files Browse the repository at this point in the history
  • Loading branch information
fouge committed Apr 11, 2024
1 parent eecddc5 commit 4984e9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions orb-slot-ctrl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl Error {
}

/// Representation of the slot.
#[derive(Clone, Copy)]
#[repr(u8)]
pub enum Slot {
/// The Slot A is represented as 0.
Expand Down Expand Up @@ -202,6 +203,7 @@ pub fn get_next_boot_slot() -> Result<Slot, Error> {

/// Set the slot for the next boot.
pub fn set_next_boot_slot(slot: Slot) -> Result<(), Error> {
reset_retry_count_to_max(slot)?;
efivar::bootchain::set_next_boot_slot(slot as u8)
}

Expand Down

0 comments on commit 4984e9a

Please sign in to comment.