delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/01/11:46:25

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: Re: experimental coreutils-5.94-4
Date: Wed, 1 Mar 2006 16:44:25 +0000 (UTC)
Lines: 39
Message-ID: <loom.20060301T172506-641@post.gmane.org>
References: <022820061618 DOT 27185 DOT 440477D700069FD600006A3122069997350A050E040D0C079D0A AT comcast DOT net> <20060228174432 DOT GB27116 AT calimero DOT vinschen DOT de> <20060301154541 DOT GU3184 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:

> 
> FYI, I've applied a patch today which has two purposes:
> 
> - For directories, which are used as mount points, the d_ino was the one
>   returned by Windows for this very directory entry.  However, for mount
>   points, the inode number which should be returned (and which *is*
>   returned by stat) is the inode number of the target directory/ target
>   drive, the mount point points to.  This is (hopefully correctly)
>   accomplished by the patch.

Worked for me on a self-built dll!  Thanks for an awesome patch.

> 
>   Now, with the patch, they are listed even though they don't exists in
>   reality on the drive.  The additional advantage is that the shell's
>   file completion now also works for these paths.

Now, what would be really cool is if the link count of directories with
mount points could be updated, to match the fact that readdir can now see
mount points:

$ cd /usr/
$ ls -dl .
drwxr-xr-x+ 21 eblake Domain Users 0 Mar  1 09:22 ./
$ mkdir /cygdrive/c/cygwin/usr/lib
$ ls -dl .
drwxr-xr-x+ 22 eblake Domain Users 0 Mar  1 09:26 ./

Oops - see how the link count changed from 21 to 22 when I had a physical
backing directory?  find (and any other tool that optimizes a recursive
search to look at (link count - 2) subdirectories and then quit) might
get confused by the fact that the number of subdirs given by readdir is
no longer consistent with the link count.

-- 
Eric Blake



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019