This is the mail archive of the cygwin-talk 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: Not directly Cygwin: Windows special filenames


On Jul 31 14:32, Shaddy Baddah wrote:
> Hi again,
> 
> On 7/31/2006 2:11 PM, Shaddy Baddah wrote:
> >Indeed cygpath -m /dev/sda or /dev/sda1 return the equivalents from this
> >page. Is this misleading, seeing as they are not really valid DOS names?
> 
> Sorry, that was a little presumptions of me. Are paths such as 
> \device\harddisk0\partition0. When I try to open a file to this path, it 
> is not recognised as valid.

These are not valid paths in the DOS namespace.  It's an NT native
device name which is mapped to \\.\physicaldrive0 in DOS.  See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/querydosdevice.asp
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
and
http://www.sysinternals.com/Utilities/WinObj.html

> Does it live in the same namespace, so to speak, as C:, 
> \\suchandsuchserver, etc?
> 
> That's where I am coming from in terms of an expectation of what cygwin 
> -w would return.

I guess you mean cygpath -w.  Well, these are the paths used in Cygwin
internally since Cygwin uses the native API to access disk and tape
devices.  cygpath calls Cygwin functions which just translate between
the POSIX paths and the DOS/NT paths used internally.  It does not do
the extra step of recreating the DOS device names from the NT device
names.  This would be especially tricky in case of Harddisk names
because Cygwin uses paths which are not used for the DOS device mapping.

If you want cygpath to create the correct Windows equivalents,
http://cygwin.com/acronyms/#SHTDI and http://cygwin.com/acronyms/#PTC


Corinna
[who has that feeling this is an off-topic discussion for cygwin-talk]


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