From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32265 invoked by alias); 31 Jul 2006 10:26:40 -0000 Received: (qmail 32258 invoked by uid 22791); 31 Jul 2006 10:26:39 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 31 Jul 2006 10:26:37 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7740C54C007; Mon, 31 Jul 2006 12:26:35 +0200 (CEST) Date: Mon, 31 Jul 2006 10:26:00 -0000 From: Corinna Vinschen To: cygwin-talk@cygwin.com Subject: Re: Not directly Cygwin: Windows special filenames Message-ID: <20060731102635.GG8152@calimero.vinschen.de> Reply-To: cygwin-talk@cygwin.com Mail-Followup-To: cygwin-talk@cygwin.com References: <44CD82E3.4070401@hotmail.com.INVALID> <44CD87F6.30308@hotmail.com.INVALID> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44CD87F6.30308@hotmail.com.INVALID> User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-talk-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: cygwin-talk-owner@cygwin.com Reply-To: The Cygwin-Talk Maiming List X-SW-Source: 2006-q3/txt/msg00071.txt.bz2 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]