Grant to allow passing data to scheme handler

This commit is contained in:
Jeremy Soller 2016-09-20 14:50:04 -06:00
parent 2b915953c9
commit 941fc0b494
10 changed files with 205 additions and 19 deletions

View file

@ -84,6 +84,9 @@ fn main() {
scheme.read(&mut packet).expect("pcid: failed to read events from pci scheme");
println!("{:?}", packet);
if packet.a == 5 {
println!("{}", unsafe { ::std::str::from_utf8_unchecked(::std::slice::from_raw_parts(packet.b as *const u8, packet.c)) });
}
packet.a = 0;