Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 23 Mar 2004 13:28:53 -0800 (PST) From: Kaz Kylheku To: Volker Quetschke cc: cygwin AT cygwin DOT com Subject: Re: lstat on FAT - Was: Problem with find on FAT drives In-Reply-To: <406093E5.3050907@scytek.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 23 Mar 2004, Volker Quetschke wrote: > Date: Tue, 23 Mar 2004 14:45:41 -0500 > From: Volker Quetschke > To: cygwin AT cygwin DOT com > Subject: [cygwin] lstat on FAT - Was: Problem with find on FAT drives > > > Hi! > > > > I just found a strange problem when using find on a FAT drive. > > I got: "find: .\tmp changed during execution of find" > > OK, I analyzed the problem a bit and found that lstat can > give different inode numbers on fat, see the attached testcase. Structurally, FAT does not have inodes or hard links. Consequently, the inode numbers in a stat() implementation over FAT don't have the semantics of inode identifiers. So for instance "tmp" and "tmp/." are different objects, not merely different directory entries pointing at the same inode as they would be in a UNIX-like filesystem. By the way, you can investigate inode numbers using the -i option of ls instead of hacking up your own C program. $ mkdir tmp $ ls -din tmp tmp/. -- Meta-CVS: the working replacement for CVS that has been stable for two years. It versions the directory structure, symbolic links and execute permissions. It figures out renaming on import. Plus it babysits the kids and does light housekeeping! http://freshmeat.net/projects/mcvs -- 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/