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: More fhandler_serial fixes.


On Tue, Nov 05, 2002 at 07:36:42PM -0500, Sergey Okhapkin wrote:
>>
>> I could see changing this to size_t but not adding the extra vmin_.
>>
>> >@@ -423,20 +426,21 @@ fhandler_serial::ioctl (unsigned int cmd
>> >                                               0, &mcr, 4, &cb, 0);
>> >                if (!result)
>> >                  {
>> >-                   __seterrno ();
>> >-                   res = -1;
>> >-                   goto out;
>> >+                   modem_status |= rts | dtr;
>>
>> This is saying that if a function (DeviceIoControl) fails we fallback to
>> Win95 behavior.  Why wouldn't we want to reflect the failure of the
>> function?  Otherwise we could be masking an actual failure.
>>
>> Anyway, I've checked in a variation of this change minus the
>> DeviceIoControl part.
>
>The call to DeviceIoCtl is
>     BOOL result = DeviceIoControl (get_handle (), 0x001B0078, NULL,
>                           0, &mcr, 4, &cb, 0);
>
>I heve no ideas what does this call means, it's undocumented.

I never noticed the raw hex value there.  How ugly.

It took some digging but this seems to be where it is documented:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/serial/hh/serial/serref_5xv6.asp

However, if it is failing for you, we might as well do away with the
wincap test and just always try to use it and then fill in the default
values if it fails.

I'll check something in to do that.

cgf

The call
>always fails on my W2k when
>attempting to get the status of laptop's built-in modem. It seems to me it's
>better to ignore the error and to fall back to Win95 behavior rather than
>return the error.
>
>Sergey Okhapkin
>Somerset, NJ
>


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