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: [Patch]: NUL and other special names



Christopher Faylor wrote:
> 
> On Thu, Jun 03, 2004 at 03:53:40PM -0400, David Fritz wrote:
> >I don't how much you want to rely on undocumented features, but ntdll.dll
> >exports a function called RtlIsDosDeviceName_U().  The WINE implementation
> >has the following to say about it:
> >
> >
> >/***********************************************************************
> > *             RtlIsDosDeviceName_U   (NTDLL.@)
> > *
> > * Check if the given DOS path contains a DOS device name.
> > *
> > * Returns the length of the device name in the low word and its
> > * position in the high word (both in bytes, not WCHARs), or 0 if no
> > * device name is found.
> > */
> >ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
> 
> THANK YOU!  This is what I was vaguely remembering.
> 
> >Also, from the patch:
> >
> >/* COM and LPT must be followed by a single digit */
> >
> >The code in src/winsup/cygwin/devices.cc would seem to indicate that
> >the number is not limited to a single digit.
> 
> I believe that whenever I try to limit COM to single digits someone
> complains about their special board with 527 com ports or something.

That's another issue. COM12 is not a DOS device (on NT), but it can
be the basename of an NT device.

I had in mind the test in path.cc:special_name . It looks for > 1
digits and it's appropriate for Win9x

Pierre


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