delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/14/11:43:09

Date: Tue, 14 Aug 2001 18:36:19 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: acottrel AT ihug DOT com DOT au
Message-Id: <5567-Tue14Aug2001183619+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com, sandmann AT clio DOT rice DOT edu
In-reply-to: <015401c124c4$d13fbdd0$0a02a8c0@acceleron> (acottrel@ihug.com.au)
Subject: Re: Fw: Fstat.c patch
References: <00fe01c12311$92957890$0a02a8c0 AT acceleron> <4331-Mon13Aug2001125532+0300-eliz AT is DOT elta DOT co DOT il> <019701c123f9$6febae70$0a02a8c0 AT acceleron> <557-Mon13Aug2001165656+0300-eliz AT is DOT elta DOT co DOT il> <028c01c12405$d1b326e0$0a02a8c0 AT acceleron> <013d01c124bc$b4b1fe60$0a02a8c0 AT acceleron> <015401c124c4$d13fbdd0$0a02a8c0 AT acceleron>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
> Date: Tue, 14 Aug 2001 23:27:06 +1000
> 
> You are correct in that it is exactly what Charles indicated previously that
> this is an issue with _get_dev_info().
> 
> Why do stat() and lstat()/fstat() use a different methods to get st_dev?

Because stat gets the full file name, whereas fstat only gets a
handle.  Therefore, stat calls findfirst (actually, lstat does that;
stat is just a wrapper around lstat) and gets most of the infor from
what findfirst returns.  fstat cannot call findfirst, so it needs
different tricks to get the same information.

We need to find a way to determine the drive letter where a file lives
given only a handle on which that file is open...  Any ideas?

- Raw text -


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