Skip to content

Commit

Permalink
Add some more useful functions
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Aug 11, 2024
1 parent ad3a959 commit 50dfe06
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions uefi/src/proto/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,19 @@ impl Shell {
// will always be initialized and valid.
.to_result_with_val(|| unsafe { file_size.assume_init() })
}

/// Major version of the shell
pub fn major_version(&self) -> u32 {
self.0.major_version
}

/// Minor version of the shell
pub fn minor_version(&self) -> u32 {
self.0.minor_version
}

/// Event to check if the user has requested execution to be stopped (CTRL-C)
pub fn execution_break(&self) -> Option<Event> {
unsafe { Event::from_ptr(self.0.execution_break) }
}
}

0 comments on commit 50dfe06

Please sign in to comment.