www.delorie.com/archives/browse.cgi | search |
DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 51IK2mFe3605571 |
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 51IK2mFe3605571 |
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=hDLqHd1G | |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 863F93858C33 |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1739908967; | |
bh=aXkmZCc6I3sTcp6W/bdOvk8rMHAGPX4ikF2xFYdM7AM=; | |
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=hDLqHd1GvtFvxONfUmIupsD0WG1G721IEjjn94fd1yPJ7q7pPrSTpwFC5lipiUhQK | |
I3XlqU1pSBc2V8go7k1TCb8LmvhvhqNwhJ3p0DLaugKu84SxNTRikBc6C3uh5IKbuc | |
luxftTLwmQ2zdYPutaFIlATUYfTmh8Xl247Hpvb0= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org B58F83858C42 |
Date: | Tue, 18 Feb 2025 21:02:20 +0100 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [regression-3.6] df -k on Cygwin 3.6 no longer lists all |
filesystems | |
Message-ID: | <Z7TnTG1luf3DaNYy@calimero.vinschen.de> |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <CALXu0UfOeEOsp4=zEa3Q3-9GjCmcQC6RCwdy2QEFA2uVvqRLhg AT mail DOT gmail DOT com> |
<e8ab61d0-9893-6c20-e234-f58355d30189 AT jdrake DOT com> | |
<Z7TZkWITTUxxnhf8 AT calimero DOT vinschen DOT de> | |
<328ed80b-aadb-262b-fd7b-37d0cc04c88e AT jdrake DOT com> | |
<Z7TfpSKvHtBxPd9f AT calimero DOT vinschen DOT de> | |
<7fde8a02-a591-e86c-8699-f457bef86134 AT jdrake DOT com> | |
MIME-Version: | 1.0 |
In-Reply-To: | <7fde8a02-a591-e86c-8699-f457bef86134@jdrake.com> |
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 18 11:41, Jeremy Drake via Cygwin wrote: > On Tue, 18 Feb 2025, Corinna Vinschen via Cygwin wrote: > > > On Feb 18 11:19, Jeremy Drake via Cygwin wrote: > > > On Tue, 18 Feb 2025, Corinna Vinschen via Cygwin wrote: > > > > > > > Yep. Are you going to create a patch? > > > > > > I'm not seeing a particularly clean way to do this. Bring back > > > available_drives, mask off bits when we see the corresponding drive root > > > from dos_drive_mappings, and return those drive letters whose bits are > > > still set at the end? > > > > No, I wouldn't do that. > > > > IMHO, the cleanest way to bring this back is to extend > > dos_drive_mappings::dos_drive_mappings(): > > > > - Prior to the FindFirstVolumeW/FindNextVolumeW loop, prepend another > > loop iterating over GetLogicalDrives() or GetLogicalDriveStringsW(). > > In the loop, call QueryDosDevice and add this info to > > dos_drive_mappings, just as in the FindVolume loop. > > > > - In the second loop, simply ignore all mounts mounted to just a drive > > letter (because the first loop already added them all). > > > > Makes sense? > > The second loop would have to go back over the list created by the first > loop, to see if the volume it's trying to add already has an entry, and if > so extend its dosmount linked list with additional (non-drive-letter > roots) mounts for that volume. I guess it only needs to do that if there > are any volumes which have both drive-letter-root AND > non-drive-letter-root mounts, so that's not TOO bad. I'm pretty sure the second loop doesn't have to do much testing. GetLogicalDrives/GetLogicalDriveStringsW both return *all* simple drive letter mount points valid for the current user. So in the second loop, you can just skip all simple drive letter mount points returned by GetVolumePathNamesForVolumeNameW, without further testing. They already have been returned above. You only have to memorize the mount points mounted on directories in this loop. You *could* first do the FindFirstVolumeW/FindNextVolumeW loop and *then* the GetLogicalDrives/GetLogicalDriveStringsW loop, but in this case you really have to check every single drive letter if it already has shown up in the first loop... > I'll try to make a patch for this. Great! Thanks, 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |