tools:iio:iio_event_monitor: check if event is fully read

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>
This commit is contained in:
Hartmut Knaack 2015-06-10 21:51:19 +02:00 committed by Jonathan Cameron
parent efa86e9fa8
commit 09a33f0521
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}