[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] symlinks and hostfs



On Sat, 2009-08-29 at 16:12 +0200, Petr Stehlik wrote:
> Frank Naumann píše v So 29. 08. 2009 v 15:30 +0200:
> 
> > >> The mintlib use the Fstat64() kernel call if available (starting from
> > >> FreeMiNT 1.15.4)
> > >
> > > HostFS implements Fstat64 but AFAIK it's currently disabled because of
> > > the UTC timestamp conversion issue that I've been explaining in this and
> > > other threads several times already.
> > 
> > No, Fstat64() is a system call. It can't be implemented by an xfs, it's 
> > implemented by the kernel. The stat64() call inside the xfs interface is 
> > something different.
> 
> You're right. I was too lazy to use the right terms because I simply
> believed everybody knew already what I meant:
> 
> freemint/sys/xfs/hostfs/hostfs_xfs.c line 250:
> 
> #if 0
> /* This is not used as there are problems with timezone synchronization
>    between FreeMiNT and the NF implementing emulator. */
> static
> long     _cdecl hostfs_fs_stat64     (fcookie *file, STAT *xattr)
> {
> 	return nf_call(HOSTFS(XFS_STAT64), file, xattr);
> }
> #endif
> 
> If we re-read this whole thread we find out that at the very beginning
> Vincent said that because "Fstat64() does not seem to be implemented in
> hostfs, we fall back in Fxattr()" and then questioned the "unused flag".
> Alan quickly jumped in and reported that "this is a bug in aranym. It
> uses it's own host_stat64()". This is where this thread got sort of
> interconnected with the parallel thread "stat() and blocks" because in
> that thread Alan said the same thing about HostFS :-)

Excuse me, but what exactly did I say on the "stat() and blocks"
thread ??

Getting back to my patch, it uses lstat() exclusively in all cases.
Using stat() will end up stat'ing the wrong file when symlinks are being
checked. This looks like a bug in ARAnyM to me, and I've said nothing
more. I've posted a patch to help demonstrate the problem with ARAnyM,
which cures the problem for me, but still has the "absolute" path
problem that Vincent also reported. I suspect with the latest CVS and my
patch, that this is now cured.

Alan.