delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/07/05:45:26

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 517AjQYx2762094
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 517AjQYx2762094
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=ZCivfVjO
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5228B3858CD1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1738925125;
bh=h3KmI3byXnisvtJEOBAUAJZSRGsM3aNtzZCBVzob0iI=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=ZCivfVjOVs2hbzSetJ5H9g8PlfhWz9L/N18q4LWna8juI904VZ6h6tKMbFhmC0/ml
KkR8sjvvM4IqwAAJH6jP7Pgy7BYAJAXNjkE5lv6YXT4yvqV+9A8u5JOFUfhjwTHKgD
4XpSzgUhM3jVPgpZtufmja1Yxk6TG5qsznelMKKk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EEE833858420
Date: Fri, 7 Feb 2025 11:43:57 +0100
To: cygwin AT cygwin DOT com
Subject: Re: exposing Windows mountpoints in Cygwin
Message-ID: <Z6Xj7QR_ZQUKNdTh@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <09960367-4427-2929-9b12-17cc2a15f5c3 AT jdrake DOT com>
<Z6Xca2fSsB1rcq7n AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <Z6Xca2fSsB1rcq7n@calimero.vinschen.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


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