|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/oxenstored: Fix | vs & error in fd event handling
commit e01898f17ca667c2630c8b7dfe43490f48331e53
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Nov 26 15:09:40 2014 +0000
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Nov 28 11:09:24 2014 +0000
tools/oxenstored: Fix | vs & error in fd event handling
This makes fields 0 and 1 true more often than they should be, resulting
problems when handling events.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
CC: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
CC: Zheng Li <zheng.li3@xxxxxxxxxx>
CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Reviewed-by: Zheng Li <dev@xxxxxxxx>
Reviewed-by: David Scott <dave.scott@xxxxxxxxxx>
---
tools/ocaml/xenstored/select_stubs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/ocaml/xenstored/select_stubs.c
b/tools/ocaml/xenstored/select_stubs.c
index 4a8edb5..af72b84 100644
--- a/tools/ocaml/xenstored/select_stubs.c
+++ b/tools/ocaml/xenstored/select_stubs.c
@@ -56,8 +56,8 @@ CAMLprim value stub_select_on_poll(value fd_events, value
timeo) {
events = Field(Field(fd_events, i), 1);
if (c_fds[i].revents & POLLNVAL) unix_error(EBADF,
"select", Nothing);
- Field(events, 0) = Val_bool(c_fds[i].events | POLLIN
&& c_fds[i].revents & (POLLIN |POLLHUP|POLLERR));
- Field(events, 1) = Val_bool(c_fds[i].events | POLLOUT
&& c_fds[i].revents & (POLLOUT|POLLHUP|POLLERR));
+ Field(events, 0) = Val_bool(c_fds[i].events & POLLIN
&& c_fds[i].revents & (POLLIN |POLLHUP|POLLERR));
+ Field(events, 1) = Val_bool(c_fds[i].events & POLLOUT
&& c_fds[i].revents & (POLLOUT|POLLHUP|POLLERR));
Field(events, 2) = Val_bool(c_fds[i].revents & POLLPRI);
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |