Commit 32a58c3b authored by Jeremy Soller's avatar Jeremy Soller

Update event crate

parent 9bc5c519
...@@ -262,7 +262,7 @@ dependencies = [ ...@@ -262,7 +262,7 @@ dependencies = [
[[package]] [[package]]
name = "netutils" name = "netutils"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/redox-os/netutils.git#7eda176e6b4e2edbcc0616247598ec5e87bfe8e8" source = "git+https://github.com/redox-os/netutils.git#f1861a0caa73c5351a3594cc39a677af709b8cbe"
dependencies = [ dependencies = [
"arg_parser 0.1.0 (git+https://github.com/redox-os/arg-parser.git)", "arg_parser 0.1.0 (git+https://github.com/redox-os/arg-parser.git)",
"extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)",
...@@ -469,7 +469,7 @@ dependencies = [ ...@@ -469,7 +469,7 @@ dependencies = [
[[package]] [[package]]
name = "redox_event" name = "redox_event"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/redox-os/event.git#f2448cdafefa5a8deb304d7ea09faf3feb5ff328" source = "git+https://github.com/redox-os/event.git#e9bf8ee4622cb82af2a10032ed711174b2188afd"
dependencies = [ dependencies = [
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
......
...@@ -94,18 +94,20 @@ fn main() { ...@@ -94,18 +94,20 @@ fn main() {
for (handle_id, handle) in scheme.handles.iter() { for (handle_id, handle) in scheme.handles.iter() {
if handle.events & EVENT_READ != 0 { if handle.events & EVENT_READ != 0 {
if let Some(count) = scheme.can_read(*handle_id) { if let Some(count) = scheme.can_read(*handle_id) {
let event_packet = Packet { if count > 0 {
id: 0, let event_packet = Packet {
pid: 0, id: 0,
uid: 0, pid: 0,
gid: 0, uid: 0,
a: syscall::number::SYS_FEVENT, gid: 0,
b: *handle_id, a: syscall::number::SYS_FEVENT,
c: EVENT_READ, b: *handle_id,
d: count c: EVENT_READ,
}; d: count
};
socket.write(&event_packet).expect("vesad: failed to write display event");
socket.write(&event_packet).expect("vesad: failed to write display event");
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment