Re: [PATCH] Cygwin: include network mounts in cygdrive_getmntent.

2025-02-18 Thread Lionel Cons
Does this patch cover global mounts, i.e. SMB mounted by user LocalSystem on a driver letter are visible to ALL users. Local users logons can override the same drive letter via per-user net use Example: LocalSystem mounts H: to \\homeserver\disk4\users, this is visible to all users in a system Use

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
On Tue, 18 Feb 2025, Jeremy Drake via Cygwin-patches wrote: > On Tue, 18 Feb 2025, Corinna Vinschen wrote: > > > Alternatively... calling the constructor with a parameter > > `bool with_floppies'? > > I can buy that. I'll wait for your review of the patch I just sent before > sending a patch on t

[PATCH v2 2/2] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
This was previously done, but was lost when the function was updated to list all Windows mount points, not just drive letters. Fixes: 04a5b072940cc ("Cygwin: expose all windows volume mount points.") Signed-off-by: Jeremy Drake --- winsup/cygwin/local_includes/mount.h | 3 ++- winsup/cygwin/mou

[PATCH v2 1/2] Cygwin: include network mounts in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
After migrating from GetLogicalDrives to Find(First|Next)VolumeW, mapped network drives no longer showed up in getmntent output. To fix that, also iterate GetLogicalDriveStringsW when builing dos_drive_mappings, and merge with volume mounts (skipping any volume mounts that are just mounted on the

Re: [PATCH] Cygwin: include network mounts in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
On Wed, 19 Feb 2025, Lionel Cons wrote: > Does this patch cover global mounts, i.e. SMB mounted by user > LocalSystem on a driver letter are visible to ALL users. Local users > logons can override the same drive letter via per-user net use > > Example: > LocalSystem mounts H: to \\homeserver\disk4

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Corinna Vinschen
Hi Jeremy, On Feb 18 10:38, Jeremy Drake via Cygwin-patches wrote: > @@ -1742,17 +1742,19 @@ struct mntent * > mount_info::cygdrive_getmntent () > { >tmp_pathbuf tp; > - const wchar_t *wide_path; > + dos_drive_mappings::dos_device_mountpoint dos_mount; >char *win32_path, *posix_path; >

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
On Tue, 18 Feb 2025, Corinna Vinschen wrote: > Actually, given that we can't do without GetLogicalDrives anyway, > this could be folded into the mapping list creation within > dos_drive_mappings::dos_drive_mappings. I don't agree. That would affect the other user(s) of dos_drive_mappings. What i

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Corinna Vinschen
On Feb 18 22:17, Corinna Vinschen wrote: > On Feb 18 13:10, Jeremy Drake via Cygwin-patches wrote: > > On Tue, 18 Feb 2025, Corinna Vinschen wrote: > > > > > Actually, given that we can't do without GetLogicalDrives anyway, > > > this could be folded into the mapping list creation within > > > dos

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Corinna Vinschen
On Feb 18 13:10, Jeremy Drake via Cygwin-patches wrote: > On Tue, 18 Feb 2025, Corinna Vinschen wrote: > > > Actually, given that we can't do without GetLogicalDrives anyway, > > this could be folded into the mapping list creation within > > dos_drive_mappings::dos_drive_mappings. > > I don't agr

[PATCH] Cygwin: include network mounts in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
After migrating from GetLogicalDrives to Find(First|Next)VolumeW, mapped network drives no longer showed up in getmntent output. To fix that, also iterate GetLogicalDriveStringsW when builing dos_drive_mappings, and merge with volume mounts (skipping any volume mounts that are just mounted on the

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Corinna Vinschen
Hi Jeremy, On Feb 18 10:38, Jeremy Drake via Cygwin-patches wrote: > @@ -1742,17 +1742,19 @@ struct mntent * > mount_info::cygdrive_getmntent () > { >tmp_pathbuf tp; > - const wchar_t *wide_path; > + dos_drive_mappings::dos_device_mountpoint dos_mount; >char *win32_path, *posix_path; >

Re: [PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
On Tue, 18 Feb 2025, Corinna Vinschen wrote: > Alternatively... calling the constructor with a parameter > `bool with_floppies'? I can buy that. I'll wait for your review of the patch I just sent before sending a patch on top of that to implement this.

[PATCH] Cygwin: skip floppy drives in cygdrive_getmntent.

2025-02-18 Thread Jeremy Drake via Cygwin-patches
This was previously done, but was lost when the function was updated to list all Windows mount points, not just drive letters. Fixes: 04a5b072940cc ("Cygwin: expose all windows volume mount points.") Signed-off-by: Jeremy Drake --- I finally got a chance to test on a machine that still has a phy