* fhandler_serial.cc: Fix formatting problems introduced by below changes.
This commit is contained in:
parent
780c42b43a
commit
08e2551c20
@ -1,17 +1,22 @@
|
|||||||
|
2002-07-22 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fhandler_serial.cc: Fix formatting problems introduced by below
|
||||||
|
changes.
|
||||||
|
|
||||||
2002-07-22 Jacek Trzcinski <jacek@certum.pl>
|
2002-07-22 Jacek Trzcinski <jacek@certum.pl>
|
||||||
|
|
||||||
* fhandler.h (class fhandler_serial): Add new members of
|
* fhandler.h (class fhandler_serial): Add new members of the class -
|
||||||
the class - rts,dtr and method ioctl(). Variables rts and dtr
|
rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x
|
||||||
important for Win 9x only.
|
only.
|
||||||
* fhandler_serial.cc (fhandler_serial::open): Add initial setting
|
* fhandler_serial.cc (fhandler_serial::open): Add initial setting of
|
||||||
of dtr and rts. Important for Win 9x only.
|
dtr and rts. Important for Win 9x only.
|
||||||
(fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
|
(fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
|
||||||
TIOCMSET and TIOCINQ.
|
TIOCMSET and TIOCINQ.
|
||||||
(fhandler_serial::tcflush): Fixed found error.
|
(fhandler_serial::tcflush): Fixed found error.
|
||||||
(fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
|
(fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
|
||||||
for Win 9x only.
|
for Win 9x only.
|
||||||
* termios.h: Add new defines as a support for ioctl() function
|
* termios.h: Add new defines as a support for ioctl() function on
|
||||||
on serial device.
|
serial device.
|
||||||
|
|
||||||
2002-07-20 Christopher Faylor <cgf@redhat.com>
|
2002-07-20 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ fhandler_serial::open (path_conv *, int flags, mode_t mode)
|
|||||||
request TIOCMGET could return correct value of RTS and DTR lines.
|
request TIOCMGET could return correct value of RTS and DTR lines.
|
||||||
Important only for Win 9x systems */
|
Important only for Win 9x systems */
|
||||||
|
|
||||||
if (wincap.is_winnt() == false)
|
if (!wincap.is_winnt ())
|
||||||
{
|
{
|
||||||
if (EscapeCommFunction (get_handle (), SETDTR) == 0)
|
if (EscapeCommFunction (get_handle (), SETDTR) == 0)
|
||||||
system_printf ("couldn't set initial state of DTR for %s, %E", get_name ());
|
system_printf ("couldn't set initial state of DTR for %s, %E", get_name ());
|
||||||
@ -409,10 +409,10 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
|
|||||||
modemStatus |= TIOCM_RI;
|
modemStatus |= TIOCM_RI;
|
||||||
if (modemLines & MS_RLSD_ON)
|
if (modemLines & MS_RLSD_ON)
|
||||||
modemStatus |= TIOCM_CD;
|
modemStatus |= TIOCM_CD;
|
||||||
if (wincap.is_winnt() == true)
|
if (!wincap.is_winnt ())
|
||||||
|
modemStatus |= rts | dtr;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
/* here is Windows NT or Windows 2000 part */
|
|
||||||
result = DeviceIoControl (get_handle (),
|
result = DeviceIoControl (get_handle (),
|
||||||
0x001B0078,
|
0x001B0078,
|
||||||
NULL, 0, &mcr, 4, &cbReturned, 0);
|
NULL, 0, &mcr, 4, &cbReturned, 0);
|
||||||
@ -424,14 +424,6 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
|
|||||||
modemStatus |= TIOCM_RTS;
|
modemStatus |= TIOCM_RTS;
|
||||||
if (mcr & 1)
|
if (mcr & 1)
|
||||||
modemStatus |= TIOCM_DTR;
|
modemStatus |= TIOCM_DTR;
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
/* here is Windows 9x part */
|
|
||||||
modemStatus |= rts | dtr;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
*(int *) buffer = modemStatus;
|
*(int *) buffer = modemStatus;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user