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

Reply via email to