This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
fhandler_serial fix
- From: "Sergey Okhapkin" <sos at prospect dot com dot ru>
- To: "Cygwin-Patches" <cygwin-patches at cygwin dot com>
- Date: Sun, 3 Nov 2002 22:24:33 -0500
- Subject: fhandler_serial fix
The patch fixes a crash when ioctl(fd, TCFLSH, how) is called for a serial
port.
2002-11-03 Sergey Okhapkin <sos@prospect.com.ru>
* fhandler_serial.cc (fhandler_serial::ioctl): the 3rd argument of
ioctl(fd, TCFLSH, ...) is integer but not a pointer.
Index: fhandler_serial.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_serial.cc,v
retrieving revision 1.31
diff -u -p -r1.31 fhandler_serial.cc
--- fhandler_serial.cc 30 Sep 2002 04:35:17 -0000 1.31
+++ fhandler_serial.cc 4 Nov 2002 03:19:55 -0000
@@ -391,6 +391,9 @@ fhandler_serial::ioctl (unsigned int cmd
int modemStatus;
int request;
+ if (cmd == TCFLSH)
+ return tcflush ((int) buffer);
+
request = *(int *) buffer;
action = 0;
modemStatus = 0;
Sergey Okhapkin
Somerset, NJ