Logging
This commit is contained in:
parent
cef1cd7495
commit
af1ce3c723
@ -82,9 +82,10 @@ impl Format {
|
||||
const OUT: usize = reduce::mono::out_size(IN_SIZE);
|
||||
let mut buf = [0u8; IN_SIZE];
|
||||
loop {
|
||||
src.read_exact(&mut buf)?;
|
||||
src.read_exact(&mut buf)
|
||||
.context("while reading framebuffer")?;
|
||||
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))?;
|
||||
|
||||
let address = usize::from_str_radix(addr, 16).context("Error parsing framebuffer address")?;
|
||||
println!("Found framebuffer at 0x{:X}", address);
|
||||
|
||||
Ok(address + 8)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user