DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51J6hgfr3816219 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 51J6hgfr3816219 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=sP/h95Ue X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5453C3858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1739947420; bh=V01orRU5zopkKm22v1SUoRvdec4RpvvrZRC07L1LE5Y=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sP/h95UehEXnhqMQ5E4XlRaFqJ8UfgaKO85ppgAIatApCrQJ9Jw/EQEdiZWokw5Oq TheVFyQNf+l6SK1bXwsa55CqtZIedbRJQLmWhVcGAGhK2OrvdJxmWn2gDv2Q1uOSEk xus3G+7sSDWFfiaky+plq4ShzNVc+3/CVmHIh7Fg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B9543858C42 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5B9543858C42 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739947344; cv=none; b=KVS0URVmbWPDayTRe6eCyeXMAXnz56S4rS+aDT0IUzXpg3MqRsa7EFpW5WbHMKRwjCXbSsFnjQJYsVbwz2U8WhrSeBkBxABBtblZex1I21P9pURH6g7vvQ6xly8d3Y3lppox6Ac40dDaNgKnDqYZFHRsmQ80pjqJhQPB+y7Vs10= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739947344; c=relaxed/simple; bh=34tDRqDJ9V92/zvNJePjgeKbLgGf77OvzsowuJurHc0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=DP04zxZ6OcUnY0ysdWGZRvtX66XjESp2hcjelrcvsUpLEOwXnd5uo6oLRQFi1rzOaD258jH3ETo7YEpljO8EU18gEXauW4of9vxipk6u69mMe0sRj33nJe9FEMes7wBjVHmDhP0Gck31j5/qbRAy6QIB4U0vu8lzgB/BvQ7xKDs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B9543858C42 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739947343; x=1740552143; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F8WRDRNkEev3y5LT8Ipw2EjlZG9BB6S/x8YrH9l6KZs=; b=XaTljlljxYS13cDkROuYSNcM1Dm7vdTxLal3GrzvQ2oGdvx9wuqoQRzOhxovs7Ov94 9IduSF0jGZMHyDSBDbO5YawCFtOreQ+DpQaze6pyIBs/n2ckYtjaGv6epOb/682Tbl6/ Bh/QFL+l1M0H8AanG+pKh7G3eOqPRoPtl4AHNkOVZy8dvwRgLpW0E7pXQVie1ux3jI6f a4d60thBHIbZjucpATMos+izw3PWwz3K7OzV5SXXu9SEVuCvInaa1WoBsuXBqW2MOAX0 bxmEMsqZCyuI0Z2gFerYU1jNhgezh+tp+ZiTIdm1QKKipVKun0hbSmbLhTuQM5qBLvKm kk9A== X-Gm-Message-State: AOJu0YyCW/fbrAs6d1RKf+6J+SFnzFaaojqXParaHptmI4p4hImhwKnA NHdGBdcxnMKQyhz99Ff47q7xY78OVw3lS7kmdobyglDO8Td4LlTZDCGKkWZg3sCz5okg+vlR7zx daAkmZ5PgCJBHr9MLmIUT2OEsVfaM4A== X-Gm-Gg: ASbGnctkfPQILGFPPpZTCANk5dluZMoq/yhNWooQNHpvhX+9ntr2P2Mmrq07I/AwHaY 4ZhMwWtC6AOMlbsndtjKB9Noh306JmwVzUfl7clSNg5+CCi3yGy+gO4Dc/nc+gXfS/gsL69597w == X-Google-Smtp-Source: AGHT+IGoUAlge75kz/3LRQi26sPKNtsN3wKJEHedcABXCKyIPr4Hepss3RHNwaIa1rMNBUkMPyY1botqEl5/jvAhGXc= X-Received: by 2002:a17:90b:4b8c:b0:2ee:e18b:c1fa with SMTP id 98e67ed59e1d1-2fcb5a9a0c4mr3702362a91.28.1739947342905; Tue, 18 Feb 2025 22:42:22 -0800 (PST) MIME-Version: 1.0 References: <328ed80b-aadb-262b-fd7b-37d0cc04c88e AT jdrake DOT com> <7fde8a02-a591-e86c-8699-f457bef86134 AT jdrake DOT com> In-Reply-To: Date: Wed, 19 Feb 2025 07:42:00 +0100 X-Gm-Features: AWEUYZkYtPPiSVfqlSezwye8w-KYcewiNtp-ic-cGEzqFeYk0LI_LhMoBd_4bWI Message-ID: Subject: UNC mounts missing in df -k Re: [regression-3.6] df -k on Cygwin 3.6 no longer lists all filesystems To: cygwin AT cygwin DOT com X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Cedric Blancher via Cygwin Reply-To: Cedric Blancher Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" On Tue, 18 Feb 2025 at 21:02, Corinna Vinschen via Cygwin wrote: > > 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! What about UNC mounts, like mounting the Microsoft NFSv3 filesystem with an UNC path? This should be listed, too - as "net use" lists those mounts Ced -- Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur -- 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