On Feb  7 11:11, Corinna Vinschen via Cygwin wrote:
> On Feb  6 13:31, Jeremy Drake via Cygwin wrote:
> > Now that my patch to escape characters in /proc/mounts has been applied,
> > I'll get back to what I was thinking about back in June.  I would like to
> > have a way to list Windows volume roots in Cygwin, and it seems to make
> > sense to me to expose them via getmntent, /proc/mounts, etc.  The way I
> > see this working is probably to replace the available_drives mechanism for
> > enumerating mounts in favor of using FindFirst/NextVolumeW and
> > GetVolumePathNamesForVolumeNameW to enumerate cygdrive mount points.
> 
> Been there, done that, but that was more than 10 years ago, so things
> might have changed.  At the time, the volume manager was incredibly
> slow.  Enumerating and converting volume paths from one style into the
> other just took too much time.  And, as you know, Cygwin already is
> slow...
> 
> Still, if you want to do that, it should not be part of the standard
> mount points becasue this is another level of implementation.  These are
> the POSIX mount points handled by Cygwin.  That should be part of the
> cygdrive handling.  Sounds like you were mulling over this anyway.
> 
> But it's not quite clear what the expected output should be.  On this
> userspace level, we have no use for Volume paths ("\\?\Volume{UUID}"),
> and we have no use for the devices ("\\?\HarddiskVolume1").
> 
> And, you can already visit this info without even having to use
> the volume manager, by just looking up the NT namespace, as the
> /proc/sys emulation does, for instance:
> 
>   $ ls -gG /proc/sys/GLOBAL\?\?/ | grep 'Volume{'
>   lr--r--r-- 1 0 Feb  7 11:11 Volume{0bd61b5f-949e-4c06-9ebe-13aa68abb838} -> 
> /proc/sys/Device/HarddiskVolume4
>   lr--r--r-- 1 0 Feb  7 11:11 Volume{437ef40c-9169-4b0c-94ee-d894aae17c56} -> 
> /proc/sys/Device/HarddiskVolume1
>   lr--r--r-- 1 0 Feb  7 11:11 Volume{a326a87c-0f80-4d14-a91a-a95e822c1a60} -> 
> /proc/sys/Device/HarddiskVolume3
>   lr--r--r-- 1 0 Feb  7 11:11 Volume{adccf9db-e210-11ef-81ad-806e6f6e6963} -> 
> /proc/sys/Device/CdRom0

Oh, and in terms of identifying the drives, we have this nice /de/disk
addition from Christian, try `ls -l /dev/disk/*'.

> 
> So what is the expected output in the cygdrive dir?
> 
> What I could imagine is something like this.  Assuming two drives, one
> of them mounted into a dir:
> 
>   C:          \Device\HarddiskVolume1
>   C:\foo      \Device\HarddiskVolume2
>   
>   $ ls -gG /cygdrive
>   d---r-x---+ 1  0 Feb  7 03:38 c
>   drwxrwxr-x  1  0 Jan  8 11:02 c_foo -> /mnt/c/foo
> 
> but other than that...
> 
> 
> Corinna
> 
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

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

Reply via email to