projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6518db1
)
gpiomon: correctly handle poll timeouts
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 29 Sep 2017 13:31:12 +0000
(15:31 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 29 Sep 2017 13:31:12 +0000
(15:31 +0200)
We don't check for timeout events in the simple loop event handler.
Fix it and return a correct value.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/tools/gpiomon.c
patch
|
blob
|
history
diff --git
a/src/tools/gpiomon.c
b/src/tools/gpiomon.c
index 533d57870ad62780e8a3bac903c0299a538ff337..cabbcedea67727ee51aa36c055a7e8c737850ce1 100644
(file)
--- a/
src/tools/gpiomon.c
+++ b/
src/tools/gpiomon.c
@@
-186,6
+186,9
@@
static int event_callback(int event_type, unsigned int line_offset,
{
struct mon_ctx *ctx = data;
+ if (event_type == GPIOD_SIMPLE_EVENT_CB_TIMEOUT)
+ return GPIOD_SIMPLE_EVENT_CB_RET_OK;
+
if (!ctx->silent) {
if ((event_type == GPIOD_SIMPLE_EVENT_CB_RISING_EDGE
&& ctx->watch_rising)