delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/09/14/14:22:04

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3D837E06.F7738F12@phekda.freeserve.co.uk>
Date: Sat, 14 Sep 2002 19:20:54 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
CC: Andrew Cottrell <acottrel AT ihug DOT com DOT au>
Subject: Re: Two rm.exe issues on XP
References: <10209020454 DOT AA16618 AT clio DOT rice DOT edu>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Charles Sandmann wrote:
[snip]
> I haven't been using filutils 4.1 on Win2K, so I don't know if I would
> see this - but it seems to indicate our inode algorithm for Win2K isn't
> reproducible.  Has the algorithm changed between V2.03 and CVS?
[snip]

It would be interesting to see whether _invent_inode is ever called with an
empty filename - see src/libc/posix/sys/stat/xstat.c:281. Perhaps some system
call is failing and we do not know the filename in fstat?

Do we know for sure that the SFT works on Windows XP? fstat uses the starting
cluster number from the SFT as the inode, if available. If the SFT is bogus,
then maybe that number would change per call? See
src/libc/posix/sys/stat/fstat.c:651. Maybe someone could build the test
program in fstat.c (build -DTEST) and see whether they can get reproducible
inode numbers.

[ I don't have access to Win2k or WinXP here (and probably never will - no
more $$$ to MS). ]

Actually I don't seem to get reproducible inode numbers on Windows '98 SE:

bash-2.04$ ./fstat.exe 0 fstat.c fstat.c
handle-0: -1 268435457 20644 1 42 0 1032031360 Sat Sep 14 19:22:40 2002
Everything checks out OK
handle-1: -1 268435457 20644 1 42 0 1032031360 Sat Sep 14 19:22:40 2002
Everything checks out OK
handle-2: -1 268435457 20644 1 42 0 1032031360 Sat Sep 14 19:22:40 2002
Everything checks out OK
handle-3: -1 268435458 20644 1 42 0 1032031360 Sat Sep 14 19:22:40 2002
Everything checks out OK
handle-4: -1 268435459 20644 1 42 0 1032031360 Sat Sep 14 19:22:40 2002
Everything checks out OK
fstat.c (7): 2 268435460 644 1 42 36544 1024238964 Sun Jun 16 14:49:24 2002
                        Times: 1031961600 1024238962
                        Block size: 4096
Failed to get starting cluster number; inode defaults to hashing
(if no other messages were printed, then this is either an empty
file on a local disk drive, or a file on a networked drive, or
you run under some kind of DOS clone)
SFT entry found, but is inconsistent with file size and time stamp
fstat.c (8): 2 268435461 644 1 42 36544 1024238964 Sun Jun 16 14:49:24 2002
                        Times: 1031961600 1024238962
                        Block size: 4096
Failed to get starting cluster number; inode defaults to hashing
(if no other messages were printed, then this is either an empty
file on a local disk drive, or a file on a networked drive, or
you run under some kind of DOS clone)
SFT entry found, but is inconsistent with file size and time stamp

The inode number is the fourth field on lines like this:

fstat.c (8): 2 268435461 644 1 42 36544 1024238964 Sun Jun 16 14:49:24 2002
               ^^^^^^^^^
                 inode

Debugging the program, I see that the SFT has an empty filename (see
fstat.c:585), which causes the SFT to be marked as bad. This is on a 28.5GB
FAT32 partition.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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