Logging
Some checks failed
Check / linting (push) Failing after 5s
Check / formatting (push) Failing after 7s
Check / build (push) Failing after 3m28s

This commit is contained in:
Mark 2025-01-26 13:21:34 -08:00
parent cef1cd7495
commit af1ce3c723
Signed by: Mark
GPG Key ID: C6D63995FE72FD80

View File

@ -82,9 +82,10 @@ impl Format {
const OUT: usize = reduce::mono::out_size(IN_SIZE); const OUT: usize = reduce::mono::out_size(IN_SIZE);
let mut buf = [0u8; IN_SIZE]; let mut buf = [0u8; IN_SIZE];
loop { loop {
src.read_exact(&mut buf)?; src.read_exact(&mut buf)
.context("while reading framebuffer")?;
reduce::mono::run(&mut buf); reduce::mono::run(&mut buf);
tgt.write_all(&buf[0..OUT])?; tgt.write_all(&buf[0..OUT]).context("while sending data")?;
} }
} }
@ -164,5 +165,7 @@ fn rm2_fb_offset(pid: usize) -> Result<usize> {
.with_context(|| format!("Error parsing line in /proc/{}/maps", pid))?; .with_context(|| format!("Error parsing line in /proc/{}/maps", pid))?;
let address = usize::from_str_radix(addr, 16).context("Error parsing framebuffer address")?; let address = usize::from_str_radix(addr, 16).context("Error parsing framebuffer address")?;
println!("Found framebuffer at 0x{:X}", address);
Ok(address + 8) Ok(address + 8)
} }