Dmitry Timoshkov : ntdll: Fallback to ioctl(TIOCOUTQ) if ioctl( TIOCSERGETLSR) fails.
Alexandre Julliard
julliard at winehq.org
Tue Aug 27 14:47:56 CDT 2013
Module: wine
Branch: master
Commit: e3dcdadaca4ff620ab55b4542af27ada6d2db819
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3dcdadaca4ff620ab55b4542af27ada6d2db819
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Aug 27 17:40:17 2013 +0900
ntdll: Fallback to ioctl(TIOCOUTQ) if ioctl(TIOCSERGETLSR) fails.
Most Linux USB-serial drivers don't support TIOCSERGETLSR.
---
dlls/ntdll/serial.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c
index 91e7230..bb025cf 100644
--- a/dlls/ntdll/serial.c
+++ b/dlls/ntdll/serial.c
@@ -828,12 +828,12 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
irq_info->temt = 0;
/* Generate a single TX_TXEMPTY event when the TX Buffer turns empty*/
#ifdef TIOCSERGETLSR /* prefer to log the state TIOCSERGETLSR */
- if (ioctl(fd, TIOCSERGETLSR, &irq_info->temt))
- {
- TRACE("TIOCSERGETLSR err %s\n", strerror(errno));
- return FILE_GetNtStatus();
- }
-#elif defined(TIOCOUTQ) /* otherwise we log when the out queue gets empty */
+ if (!ioctl(fd, TIOCSERGETLSR, &irq_info->temt))
+ return STATUS_SUCCESS;
+
+ TRACE("TIOCSERGETLSR err %s\n", strerror(errno));
+#endif
+#ifdef TIOCOUTQ /* otherwise we log when the out queue gets empty */
if (ioctl(fd, TIOCOUTQ, &irq_info->temt))
{
TRACE("TIOCOUTQ err %s\n", strerror(errno));
More information about the wine-cvs
mailing list