diff options
author | Nuno Sá <nuno.sa@analog.com> | 2023-02-16 13:14:50 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-02-18 17:06:50 +0300 |
commit | b5184a26a28fac1d708b0bfeeb958a9260c2924c (patch) | |
tree | 2eb20785991c1da58a4de997c9befec1cf7f7e7b /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 42ec40b0883c1cce58b06e8fa82049a61033151c (diff) | |
download | linux-b5184a26a28fac1d708b0bfeeb958a9260c2924c.tar.xz |
iio: buffer: correctly return bytes written in output buffers
If for some reason 'rb->access->write()' does not write the full
requested data and the O_NONBLOCK is set, we would return 'n' to
userspace which is not really truth. Hence, let's return the number of
bytes we effectively wrote.
Fixes: 9eeee3b0bf190 ("iio: Add output buffer support")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230216101452.591805-2-nuno.sa@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions