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'll try to make a patch for this. -- 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