This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fhandler_serial fix


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
>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.

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.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]