4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
Corinna Vinschen 1b7fcf22be Cygwin: ioctl: TIOCINQ: always return number of chars in the inbound queue
So far ioctl(TIOCINQ) could end up returning -1 with errno set to EINVAL
if a non-zero device error mask has been returned by ClearCommError.
This doesn't reflect Linux behaviour, which always returns the number of
chars in the inbound queue, independent of any I/O error condition.
EINVAL was a pretty weird error code to use in this scenario, too.

Fix this by dropping all checking for device errors in the TIOCINQ
case.  Just return the number of chars in the inbound queue.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-03-02 17:05:59 +01:00
..
2020-02-19 13:38:42 +01:00
2016-11-24 16:09:31 +01:00
2016-06-25 00:43:01 +02:00
2019-07-25 10:45:52 +02:00
2019-10-23 10:05:42 +02:00
2019-10-23 10:05:42 +02:00
2018-02-20 17:59:53 +01:00
2015-03-03 12:58:34 +00:00
2017-03-27 22:03:58 +01:00
2015-08-17 11:05:43 +02:00
2018-04-16 22:46:11 -05:00
2018-02-07 13:07:44 +01:00
2019-06-25 15:44:43 -04:00
2019-06-25 15:44:43 -04:00
2019-07-19 14:14:33 -04:00