* fhandler_serial.cc: Use must_init_serial_line capability throughout.

* wincap.cc: Set flag must_init_serial_line appropriately.
	* wincap.h: Add flag must_init_serial_line.
This commit is contained in:
Corinna Vinschen
2002-07-23 14:47:17 +00:00
parent fdb93cd2e1
commit 010bb8a4a1
4 changed files with 21 additions and 2 deletions

View File

@ -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.
Important only for Win 9x systems */
if (!wincap.is_winnt ())
if (wincap.must_init_serial_line ())
{
if (EscapeCommFunction (get_handle (), SETDTR) == 0)
system_printf ("couldn't set initial state of DTR for %s, %E", get_name ());
@ -409,7 +409,7 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
modemStatus |= TIOCM_RI;
if (modemLines & MS_RLSD_ON)
modemStatus |= TIOCM_CD;
if (!wincap.is_winnt ())
if (wincap.must_init_serial_line ())
modemStatus |= rts | dtr;
else
{