fhandler_serial fix

Christopher Faylor cgf@redhat.com
Sun Nov 3 20:08:00 GMT 2002

On Sun, Nov 03, 2002 at 10:24:33PM -0500, Sergey Okhapkin wrote:
>The patch fixes a crash when ioctl(fd, TCFLSH, how) is called for a serial
>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.

Thanks, but I don't think this is exactly the right solution for this
problem.  I'd rather see the handling of all of the cmds grouped in
the switch statement.

This function needed a lot of work.  There were some obvious typos (use
of a '|' where a '||' was intended) and a suspicious lack of errno
setting.  I'm going to check in a reformatting of the function which
will hopefully address the above problem as well as these others.

I wasn't sure about a couple of the errnos.  If you, or anyone has any
insight into what should be returned int the cases where I defaulted to
EINVAL, it would be appreciated.


More information about the Cygwin-patches mailing list