* Not directly Cygwin: Windows special filenames @ 2006-07-31 4:11 Shaddy Baddah 2006-07-31 4:33 ` Shaddy Baddah 0 siblings, 1 reply; 5+ messages in thread From: Shaddy Baddah @ 2006-07-31 4:11 UTC (permalink / raw) To: cygwin-talk Hi, I am familiar with the DOS names like \\.\c: to get at a raw partition from Windows command shell, that would be the equivalent of something like /dev/sda1 in Cygwin. Does anyone know of an equivalent for accessing the whole disk, i.e. the equivalent of: [snip] /dev/sda \device\harddisk0\partition0 (whole disk) [/snip] from http://www.cygwin.com/cygwin-ug-net/using-specialnames.html. I often look for clues on this page, and I get that there might be a syntax that includes \device\harddisk0\partition0 that does the job. 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? Thanks in advance, Shaddy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not directly Cygwin: Windows special filenames 2006-07-31 4:11 Not directly Cygwin: Windows special filenames Shaddy Baddah @ 2006-07-31 4:33 ` Shaddy Baddah 2006-07-31 10:26 ` Corinna Vinschen 2006-07-31 13:37 ` Igor Peshansky 0 siblings, 2 replies; 5+ messages in thread From: Shaddy Baddah @ 2006-07-31 4:33 UTC (permalink / raw) To: cygwin-talk 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. 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. Thanks in advance, Shaddy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not directly Cygwin: Windows special filenames 2006-07-31 4:33 ` Shaddy Baddah @ 2006-07-31 10:26 ` Corinna Vinschen 2006-08-01 9:57 ` Shaddy Baddah 2006-07-31 13:37 ` Igor Peshansky 1 sibling, 1 reply; 5+ messages in thread From: Corinna Vinschen @ 2006-07-31 10:26 UTC (permalink / raw) To: cygwin-talk 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] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not directly Cygwin: Windows special filenames 2006-07-31 10:26 ` Corinna Vinschen @ 2006-08-01 9:57 ` Shaddy Baddah 0 siblings, 0 replies; 5+ messages in thread From: Shaddy Baddah @ 2006-08-01 9:57 UTC (permalink / raw) To: cygwin-talk Hi, First, I would like to apologise for all the errors (grammatical, mistype, and dropped wording) in the original email. On 7/31/2006 8:26 PM, Corinna Vinschen wrote: > > These are not valid paths in the DOS namespace. It's an NT native > device name which is mapped to \\.\physicaldrive0 in DOS. See Yes, that is exactly what I was looking for. Thank you. > If you want cygpath to create the correct Windows equivalents, > http://cygwin.com/acronyms/#SHTDI and http://cygwin.com/acronyms/#PTC I would love to contribute, unfortunately cannot presently. I will however try to forward a suggestion for the Special Filenames section of the user manual, that flags the names as not being in the same "namespace" as most cygpath -w outputs, if that's ok? > Corinna > [who has that feeling this is an off-topic discussion for cygwin-talk] As in it has become on-topic for cygwin ml, right? I should have re-adjusted when the second part of my email touched on cygpath. Sorry about that. Regards, Shaddy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not directly Cygwin: Windows special filenames 2006-07-31 4:33 ` Shaddy Baddah 2006-07-31 10:26 ` Corinna Vinschen @ 2006-07-31 13:37 ` Igor Peshansky 1 sibling, 0 replies; 5+ messages in thread From: Igor Peshansky @ 2006-07-31 13:37 UTC (permalink / raw) To: The Cygwin-Talk Maiming List On Mon, 31 Jul 2006, 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. > > Does it live in the same namespace, so to speak, as C:, \\suchandsuchserver, > etc? I would imagine you'd need to use '\\.\device\harddisk0\partition0', but MSDN is not particularly forthcoming on this issue... > That's where I am coming from in terms of an expectation of what cygwin > -w would return. I take it you mean "cygpath -w"... Yes, I suppose one would expect to be able to use the exact output of "cygpath -w" to open the equivalent Windows file/device... PTC, of course. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-01 9:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-07-31 4:11 Not directly Cygwin: Windows special filenames Shaddy Baddah 2006-07-31 4:33 ` Shaddy Baddah 2006-07-31 10:26 ` Corinna Vinschen 2006-08-01 9:57 ` Shaddy Baddah 2006-07-31 13:37 ` Igor Peshansky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).