delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/08/05:53:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 8 Jun 2004 11:52:19 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygpath: Path name conversion Issue
Message-ID: <20040608095219.GB18640@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20040608042248 DOT 30125 DOT qmail AT web20603 DOT mail DOT yahoo DOT com> <NUTMEGtpfTYSl1q4gto00000219 AT NUTMEG DOT CAM DOT ARTIMI DOT COM>
Mime-Version: 1.0
In-Reply-To: <NUTMEGtpfTYSl1q4gto00000219@NUTMEG.CAM.ARTIMI.COM>
User-Agent: Mutt/1.4.2i

On Jun  8 10:14, Dave Korn wrote:
> > -----Original Message-----
> > From: cygwin-owner On Behalf Of john george
> > Sent: 08 June 2004 05:23
> 
> > Hi,
> > I'm trying to convert the following path name to a
> > unix specific format so that it could be passed as a
> > parameter to the Unix "open(..)" system call.
> > cygpath
> > "\\Device\\harddiskdmvolumes\\physicaldmvolumes\\rawvolume3
> > "
> > The converted path name is not accepted by the
> > "open()"
> > system call due to which I'm not able to access this
> > device.
> > Actually I'm trying to access a raw volume which I'm
> > able to do if I use the CreateFile() API in Windows.
> > I've no clue as to why I'm not able to access this raw
> > device using the "open().." system call.
> > Any suggesstions?
> 
>   Have you tried this way yet?
> 
> \\\\.\\Device\\harddiskdmvolumes\\physicaldmvolumes\\rawvolume3
> 
> Not sure but I think that might sort it.

It shouldn't.  The \Device\ path is an NT native path, which isn't
accessible directly through Win32 calls.  I didn't test it myself but
I suspect that using CreateFile fails.  Prepending \\.\ shouldn't
work either since it's just the Win32 equivalent to the NT native
\??\ path which is an NT native directory full of symbol links. 
E.g. the raw harddrives are symlinked there as \??\PhysicalDriveX. 
Consequentially you can access them as \\.\PhysicalDriveX from Win32. 
This is explained in the MSDN CreateFile manual page.  The problem
with accessing \Device\foo directly from CreateFile should be that
it collides with Win32 paths.  CreateFile should typically prepend
the current drive so that it tries to open X:\Device\foo.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019