Skip to content

Commit

Permalink
Only expand kext info after "loaded kext"
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualEhrmanntraut committed Aug 18, 2024
1 parent c60df91 commit 0ccdda5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@ fn main() {
.or_else(read_from_nvram)
.expect("No aapl,panic-info data");
let mut s = String::new();
let mut expand_kext_info = false;
let mut prev = 0;
let mut low = 0;
let mut bit = 0;
let mut add_char = |c: u8| {
if !expand_kext_info {
expand_kext_info = s.ends_with("loaded kext");
if !expand_kext_info {
s.push(c.into());
return;
}
}
let v = match (prev, c) {
(_, b'>') => "com.apple.driver.",
(_, b'|') => "com.apple.iokit.",
Expand All @@ -69,7 +77,7 @@ fn main() {
(b'!', b'U') => "AppleUSB",
_ => {
prev = c;
s.push(char::from(c));
s.push(c.into());
return;
}
};
Expand Down

0 comments on commit 0ccdda5

Please sign in to comment.