* 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

@ -1,3 +1,9 @@
2002-07-23 Corinna Vinschen <corinna@vinschen.de>
* 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.
2002-07-23 Corinna Vinschen <corinna@vinschen.de>
* security.cc (get_group_sidlist): Create group list from /etc files

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
{

View File

@ -46,6 +46,7 @@ static NO_COPY wincaps wincap_unknown = {
has_valid_processorlevel:false,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_95 = {
@ -83,6 +84,7 @@ static NO_COPY wincaps wincap_95 = {
has_valid_processorlevel:false,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_95osr2 = {
@ -120,6 +122,7 @@ static NO_COPY wincaps wincap_95osr2 = {
has_valid_processorlevel:false,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_98 = {
@ -157,6 +160,7 @@ static NO_COPY wincaps wincap_98 = {
has_valid_processorlevel:true,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_98se = {
@ -194,6 +198,7 @@ static NO_COPY wincaps wincap_98se = {
has_valid_processorlevel:true,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_me = {
@ -231,6 +236,7 @@ static NO_COPY wincaps wincap_me = {
has_valid_processorlevel:true,
has_64bit_file_access:false,
has_process_io_counters:false,
must_init_serial_line:true,
};
static NO_COPY wincaps wincap_nt3 = {
@ -268,6 +274,7 @@ static NO_COPY wincaps wincap_nt3 = {
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:false,
must_init_serial_line:false,
};
static NO_COPY wincaps wincap_nt4 = {
@ -305,6 +312,7 @@ static NO_COPY wincaps wincap_nt4 = {
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:false,
must_init_serial_line:false,
};
static NO_COPY wincaps wincap_nt4sp4 = {
@ -342,6 +350,7 @@ static NO_COPY wincaps wincap_nt4sp4 = {
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:false,
must_init_serial_line:false,
};
static NO_COPY wincaps wincap_2000 = {
@ -379,6 +388,7 @@ static NO_COPY wincaps wincap_2000 = {
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:true,
must_init_serial_line:false,
};
static NO_COPY wincaps wincap_xp = {
@ -416,6 +426,7 @@ static NO_COPY wincaps wincap_xp = {
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:true,
must_init_serial_line:false,
};
wincapc wincap;

View File

@ -47,6 +47,7 @@ struct wincaps
unsigned has_valid_processorlevel : 1;
unsigned has_64bit_file_access : 1;
unsigned has_process_io_counters : 1;
unsigned must_init_serial_line : 1;
};
class wincapc
@ -98,6 +99,7 @@ public:
bool IMPLEMENT (has_valid_processorlevel)
bool IMPLEMENT (has_64bit_file_access)
bool IMPLEMENT (has_process_io_counters)
bool IMPLEMENT (must_init_serial_line)
#undef IMPLEMENT
};