This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash lookups


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]