-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
732 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
mod bugcheck_codegen; | ||
use bugcheck_codegen::BUGCHECK_CODES; | ||
|
||
#[derive(Clone)] | ||
pub struct BugCheckCache {} | ||
|
||
impl BugCheckCache { | ||
/// Construct a new cache | ||
pub fn new() -> Self { | ||
Self {} | ||
} | ||
|
||
#[tracing::instrument(name = "bugcheck_lookup", skip(self))] | ||
pub fn get(&self, code: u64) -> Option<&(&str, &str)> { | ||
BUGCHECK_CODES.get(&code) | ||
} | ||
} | ||
|
||
impl Default for BugCheckCache { | ||
fn default() -> Self { | ||
Self::new() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//! This crate contains the interfaces used in production to store and lookup info. | ||
pub mod bugcheck; | ||
pub mod cpu; | ||
pub mod pcie; | ||
pub mod usb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.