Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Fri, 19 Jul 2002 00:57:00 -0400 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com Subject: Re: bash lookups Message-ID: <20020719045700.GA24153@redhat.com> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23.1i On Thu, Jul 18, 2002 at 01:20:57PM -0400, David E Euresti wrote: >So this is very strange. I have some files stored in NFS, for some reason >when I cd into a directory in NFS and 'ls' it acceses all the files >nicely. (i.e. one lookup for each file, plus some extra dll's) > >However ls -l accesses all these other files: >sfsrwcd: LOOKUP: winmm.dll >sfsrwcd: LOOKUP: wave1 >sfsrwcd: LOOKUP: wave2 >sfsrwcd: LOOKUP: wave3 >sfsrwcd: LOOKUP: aux1 >sfsrwcd: LOOKUP: aux2 >sfsrwcd: LOOKUP: aux3 >sfsrwcd: LOOKUP: aux4 >sfsrwcd: LOOKUP: midi1 >sfsrwcd: LOOKUP: midi2 >sfsrwcd: LOOKUP: midi3 >sfsrwcd: LOOKUP: midi4 > >And in the presence of cygwin symlinks (symlink.lnk) ls -l does the >following for each symlink >sfsrwcd: LOOKUP: symlink >sfsrwcd: LOOKUP: symlink.exe >sfsrwcd: LOOKUP: symlink.exe >sfsrwcd: LOOKUP: symlink.exe.lnk >sfsrwcd: LOOKUP: symlink >sfsrwcd: LOOKUP: symlink.exe >sfsrwcd: LOOKUP: symlink.exe >sfsrwcd: LOOKUP: symlink.exe.lnk > >Is there a way to switch off the devices lookup above? It sounds like you are assuming that this is somehow SOP. That might be an interesting thing to discuss in the cygwin mailing list but here, I sort of expect that you would be able to supply your own answers. However, just to help you out, a grep of the cygwin sources does not unearth any interesting uses of the word "midi" or "aux", so it sure sounds like nfs is doing something strange. Possibly strace or gdb would be of some use here. >And why so many lookups for a symlink. What's the reasoning? Think about how ls works: opendir() readdir() lstat() And, how does lstat work? cgf