From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 8A1D33858C74; Sat, 9 Sep 2023 21:29:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A1D33858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694294956; bh=FphL/eqCaDWwEA0zwrOGNYob2Qjw7YGvKXDa3iKxsag=; h=From:To:Subject:Date:From; b=hE4AxMouTZDqvKlKI/agw9XYTOZJZVZ0xJxSj2wi95y5Eom7PBRLPfKb5Wz2ByWmG 1xUduJ0RXbCLfzPCFungQTJ0YIKrWVYfUntCZeyYJjKsojNEER0f1RCoiiSoYqIFMo kRJoC79V+zmjm/ptgE3vHKUeOCHdyhZrjLZogV6Y= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: readdir: explain why we use FileNamesInformation on NFS X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 27e8815535fc7e6a9ed204323682f22be02946a5 X-Git-Newrev: 5302638f77398978cd5403e00925d8f482442c84 Message-Id: <20230909212916.8A1D33858C74@sourceware.org> Date: Sat, 9 Sep 2023 21:29:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D5302638f773= 98978cd5403e00925d8f482442c84 commit 5302638f77398978cd5403e00925d8f482442c84 Author: Corinna Vinschen AuthorDate: Sat Sep 9 23:05:29 2023 +0200 Commit: Corinna Vinschen CommitDate: Sat Sep 9 23:28:55 2023 +0200 Cygwin: readdir: explain why we use FileNamesInformation on NFS =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/fhandler/disk_file.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/d= isk_file.cc index 4f373637e514..0242cae2fd43 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc @@ -2262,6 +2262,8 @@ fhandler_disk_file::readdir (DIR *dir, dirent *de) goto go_ahead; } } + /* NFS must use FileNamesInformation! Any other information class + skips all symlinks. */ if (!(dir->__flags & dirent_get_d_ino)) status =3D NtQueryDirectoryFile (get_handle (), NULL, NULL, NULL, &io, d_cache (dir), DIR_BUF_SIZE,