Mail Archives: djgpp-workers/2003/03/19/17:04:36.1
Hello.
Eli Zaretskii wrote:
>
> > Date: Wed, 19 Mar 2003 17:34:21 +0000
> > From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> >
> > Yup. So for stat'ing directories we use _truename on that and then
> > _invent_inode to invent an inode for it. This will ensure we always
> > return the same inode for directories. Admittedly I haven't looked
> > particularly closely at the code.
>
> Now I'm confused. You've said previously that `stat' would return a
> different inode for the same file each time it is called. Then you
> said that the same solution we've used in `fstat' will help with
> `stat'. Now you are evidently saying that what `stat' does is okay?
>
> Perhaps if I saw an example of the problem, I could stop being
> confused?
It's just my bad English. Sorry. I should have used "would" more:
"Yup. So for stat'ing directories we [would] use _truename on that [the
directory's filename] and then _invent_inode to invent an inode for it. This
will ensure we always return the same inode for directories. Admittedly I
haven't looked particularly closely at the code."
Hopefully understandable this time:
We could modify stat to use _invent_inode for directories, so that it
generates the same inode every time it is called for the directory. We would
use _invent_inode, because we cannot rely on the current method (on Win2k/XP)
to return the same inode each time. To ensure that we get the same inode, we
would also have to ensure that we pass the same filename to _invent_inode. So
the directory's filename would need to be fixed using _truename.
Sorry about the bad explanation.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -