Skip to content

Commit

Permalink
Whoops
Browse files Browse the repository at this point in the history
Signed-off-by: Visual Ehrmanntraut <[email protected]>
  • Loading branch information
VisualEhrmanntraut committed Aug 22, 2023
1 parent 34df983 commit 77bffe0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@

#![deny(warnings, clippy::nursery, clippy::cargo, unused_extern_crates)]

#[cfg(target_os = "windows")]
#[macro_use]
extern crate windows;

#[cfg(target_os = "windows")]
fn read_from_nvram() -> Option<Vec<u8>> {
use windows::Win32::System::WindowsProgramming::GetFirmwareEnvironmentVariableA;
use windows::{
core::{
imp::{
FormatMessageW, GetLastError, FORMAT_MESSAGE_FROM_SYSTEM,
FORMAT_MESSAGE_IGNORE_INSERTS,
},
w, PWSTR,
},
Win32::System::WindowsProgramming::GetFirmwareEnvironmentVariableW,
};
let name = w!("aapl,panic-info");
let guid = w!("{7C436110-AB2A-4BBB-A880-FE41995C9F82}");
let mut buf = vec![0u8; 65476];
Expand Down

0 comments on commit 77bffe0

Please sign in to comment.