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

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108141727.AA16290@clio.rice.edu>
Subject: Re: Fw: Fstat.c patch
To: eliz AT is DOT elta DOT co DOT il
Date: Tue, 14 Aug 2001 12:27:02 -0500 (CDT)
Cc: acottrel AT ihug DOT com DOT au, djgpp-workers AT delorie DOT com
In-Reply-To: <7704-Tue14Aug2001195829+0300-eliz@is.elta.co.il> from "Eli Zaretskii" at Aug 14, 2001 07:58:30 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

> Does the LFN open work with devices?  That is, if we use LFN open on
> devices, can we then reliably determine that they are devices?

LFN open works with devices (better than SFN does for like directory
detection).  LFN handles have dev info as zero, just like LFN files.  But
7160c1 fails for devices, so you don't know if the file doesn't exist
or is a device.

> For devices, we need to be able to determine other attributes (those
> which _get_dev_info returns and some others).  I think we need to test
> all the IOCTL functions called by the library and see which open (SFN
> or LFN) is better.

SFN opens are better if you want dev info.  But they don't work for
directory/nul opens, and they aren't good if you want to create LFNs.

> > For new files short of reopening I don't have a fix.
> 
> We should solve this as well, somehow.
> 
> > 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.
> 
> is there a way to find out the drive given the serial number?

Look up table?

> > 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.
> 
> That's good to know, but I'm afraid I don't see how does it help with
> any of the problems we are considering.  Are you suggesting to use the
> failure as a sign of a device?  If so, we will need to find a way to
> distinguish between a failure-because-device and a failure-because-
> invalid-handle.

Correct, but it may be useful.

- Raw text -


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