delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/14/12:19:28

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108141550.AA12856@clio.rice.edu>
Subject: Re: Fw: Fstat.c patch
To: eliz AT is DOT elta DOT co DOT il
Date: Tue, 14 Aug 2001 10:50:54 -0500 (CDT)
Cc: acottrel AT ihug DOT com DOT au, djgpp-workers AT delorie DOT com
In-Reply-To: <5567-Tue14Aug2001183619+0300-eliz@is.elta.co.il> from "Eli Zaretskii" at Aug 14, 2001 06:36:19 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
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

> 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?

I've got a prototype for existing files.  We modify _open to convert 
long name to short name, then do the open by short name.  The drive 
letter is then correct.  But as noted, this doesn't work with device
names at all.  For new files short of reopening I don't have a fix.

Another thought it to use the 71a6 information which provides a volume
serial number - I'm not sure how we use this yet, but this might be
better.

A combination of device info and 71a6 may be good enough.

Note that on a valid handle 71a6 appears to fail for device handles,
which may be another hint on how to deal with devices on W2K.

- Raw text -


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