delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/03/19/17:04:36.1

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E78D73C.3B41ECF@phekda.freeserve.co.uk>
Date: Wed, 19 Mar 2003 20:46:52 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: DJGPP 2.04 release? [Was: Re: nmalloc revisited]
References: <10303182107 DOT AA24101 AT clio DOT rice DOT edu> <3E7868E9 DOT 19949F8E AT phekda DOT freeserve DOT co DOT uk> <9003-Wed19Mar2003174940+0200-eliz AT elta DOT co DOT il> <3E78AA1D DOT 23720139 AT phekda DOT freeserve DOT co DOT uk> <3405-Wed19Mar2003223319+0200-eliz AT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

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 -


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