public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Device names in /proc/mounts
@ 2011-07-25 12:30 Schwarz, Konrad
  2011-07-25 14:01 ` Corinna Vinschen
  2011-07-25 15:07 ` Christopher Faylor
  0 siblings, 2 replies; 25+ messages in thread
From: Schwarz, Konrad @ 2011-07-25 12:30 UTC (permalink / raw)
  To: cygwin

Hi,

in Linux, /proc/mounts maps device names (/dev/sda2) to mount points (/home).

in Cygwin, /proc/mounts maps DOS names (C:) to cygwin names (/cygdrive/c).
This is not terribly useful.

There seems no way of mapping device names (resp. Win32 Device Namespace names) to mount points --
the Cygwin User's Guide suggests using comparing the output of /proc/partitions with the output
of df(1) to match up the two.

It then pointedly uses the registry
entry '\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices' -- which encodes the mapping
from NT device names to DOS device names -- as an example for regtool(1)
(see http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-proc-registry).
It does not explain how to decode the information there -- but neither does MSDN.

However, blk_id(8) describes volumes in terms of (Cygwin) device names (/dev/sda2),
so an easier to use mapping would be nice to have.  It would also increase compatibility
between Cygwin and Linux.

Some poking around MSDN reveals the function QueryDosDevice.  This function's purpose would
seem to be to map DOS names to Win32 device names.  Would it make sense to use
this to populate the first column of /proc/mounts (after mapping Win32 device
names \\.\ to Cygwin device names /dev/sdxy)?

Regards
Konrad Schwarz

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2012-10-19 18:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 12:30 Device names in /proc/mounts Schwarz, Konrad
2011-07-25 14:01 ` Corinna Vinschen
2011-07-27  8:15   ` Schwarz, Konrad
2011-07-27  8:35   ` Schwarz, Konrad
2011-07-27  9:41     ` Corinna Vinschen
2011-07-27 11:19       ` Christopher Faylor
2011-07-28  8:18       ` Schwarz, Konrad
2011-07-28 11:22         ` Christopher Faylor
2011-07-29  7:46           ` Schwarz, Konrad
2011-07-29  9:21             ` Corinna Vinschen
2011-07-29 13:34               ` Schwarz, Konrad
2011-07-29 20:16                 ` Corinna Vinschen
2011-07-30  4:53                   ` Christopher Faylor
2011-07-30  8:18                     ` Corinna Vinschen
2011-08-01 13:10                       ` Nellis, Kenneth
2011-08-01 13:22                         ` Christopher Faylor
2011-08-06 23:53                   ` pb w/ cygpath -w /dev/sdXY (was Re: Device names in /proc/mounts) Cyrille Lefevre
2011-08-07 11:38                     ` Corinna Vinschen
2012-09-13 16:27                   ` associating volume labels with drive letters Nellis, Kenneth
2012-09-26  6:22                     ` Mark O'Keefe
2012-09-26 13:43                       ` Nellis, Kenneth
2012-10-19 18:45                         ` Nellis, Kenneth
2012-10-19 18:52                           ` Corinna Vinschen
2011-07-29 21:28                 ` Device names in /proc/mounts Buchbinder, Barry (NIH/NIAID) [E]
2011-07-25 15:07 ` Christopher Faylor

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).