[Patch]: NUL and other special names

Pierre A. Humblet pierre@phumblet.no-ip.org
Thu Jun 3 20:16:00 GMT 2004

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 )

Wow! Thanks.
Does it handle conin$, conout$ and clocks$ ?

> 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.

>From my tests that's the behavior on 9x, so it's appropriate code for managed
Today on the list Igor indicated that PRN would soon regain its old behavior.
My patch was more modest, just forbid using PRN (and creating a hard to delete file).

Do we want to do what Igor suggested, although it's not Posix?


More information about the Cygwin-patches mailing list