projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efa86e9
)
tools:iio:iio_event_monitor: check if event is fully read
author
Hartmut Knaack
<knaack.h@gmx.de>
Wed, 10 Jun 2015 19:51:19 +0000
(21:51 +0200)
committer
Jonathan Cameron
<jic23@kernel.org>
Sun, 21 Jun 2015 15:20:10 +0000
(16:20 +0100)
Check that the read event is of the expected size.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/iio_event_monitor.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/iio/iio_event_monitor.c
b/tools/iio/iio_event_monitor.c
index 1dba09062a64fb07ba456537d7889145eef01ae6..703f4cb0e8e9b149f6a9d2f6b3d7e3896d33740d 100644
(file)
--- a/
tools/iio/iio_event_monitor.c
+++ b/
tools/iio/iio_event_monitor.c
@@
-310,6
+310,12
@@
int main(int argc, char **argv)
}
}
+ if (ret != sizeof(event)) {
+ printf("Reading event failed!\n");
+ ret = -EIO;
+ break;
+ }
+
print_event(&event);
}