This is the mail archive of the cygwin 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: lstat on FAT - Was: Problem with find on FAT drives


On Tue, 23 Mar 2004, Volker Quetschke wrote:

> Date: Tue, 23 Mar 2004 14:45:41 -0500
> From: Volker Quetschke <quetschke@scytek.de>
> To: cygwin@cygwin.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/


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