[Patch]: NUL and other special names

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

David Fritz wrote:
> I don't think the logic implemented by RtlIsDosDeviceName_U() is all that
> different from the logic in the patch.  Which is to say, it seems to use a
> hard-coded list of names and does not actually check for existing devices.  Do
> we want to block all names that could be DOS devices or just the names of
> devices that exist?

We must handle all DOS devices because the behaviors of NtCreateFile
and of the file related Windows calls differ for those names.

When you say "block", do you take position on what we should do
(block, emulate Windows, emulate Posix)?

> This is interesting:
> http://msdn.microsoft.com/library/en-us/fileio/base/querydosdevice.asp


> So is this:
> -----
> C:\>ver
> Windows 98 [Version 4.10.2222]
> C:\>type config$
> Invalid device request reading device CONFIG$
> Abort, Retry, Ignore, Fail?f
> Fail on INT 24 - config$
> -----

Right, and this (on Win98)

W:~: touch config$.123
W:~: ls -l config$.123
ls: config$.123: No such file or directory
W:~: touch config$.1234
W:~: ls -l config$.1234
-rw-r--r--    1 pierre   all             0 Jun  3 17:46 config$.1234

On NT config$ is OK, but con.1234 isn't.
Experimenting with Windows is mind boggling.


More information about the Cygwin-patches mailing list