summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-12-28 20:09:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-12-28 20:09:53 +0000
commit268cc54089cbdeb0c2ea955448bb16a0858c4538 (patch)
tree782c5c42929926dfa806fa3b410bfbad3c35b3b5 /init
parent2dcc275936aefbb5badf3b4822d492260077144d (diff)
parent1d4e86c44589b3a97ca0113493c2e569c3aabcc6 (diff)
downloadsystem_core-268cc54089cbdeb0c2ea955448bb16a0858c4538.zip
system_core-268cc54089cbdeb0c2ea955448bb16a0858c4538.tar.gz
system_core-268cc54089cbdeb0c2ea955448bb16a0858c4538.tar.bz2
Merge "ueventd: fix a busy loop while reading uevents"
Diffstat (limited to 'init')
-rw-r--r--init/init.c2
-rw-r--r--init/ueventd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index 365726c..ab52749 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1132,7 +1132,7 @@ int main(int argc, char **argv)
continue;
for (i = 0; i < fd_count; i++) {
- if (ufds[i].revents == POLLIN) {
+ if (ufds[i].revents & POLLIN) {
if (ufds[i].fd == get_property_set_fd())
handle_property_set_fd();
else if (ufds[i].fd == get_keychord_fd())
diff --git a/init/ueventd.c b/init/ueventd.c
index a41c31e..3d01836 100644
--- a/init/ueventd.c
+++ b/init/ueventd.c
@@ -94,7 +94,7 @@ int ueventd_main(int argc, char **argv)
nr = poll(&ufd, 1, -1);
if (nr <= 0)
continue;
- if (ufd.revents == POLLIN)
+ if (ufd.revents & POLLIN)
handle_device_fd();
}
}