delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/24/08:13:08

Date: Thu, 24 Oct 1996 13:52:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Cc: Simon Oke <simon AT loony DOT demon DOT co DOT uk>, djgpp AT delorie DOT com
Subject: Re: Drive Help
In-Reply-To: <1.5.4.16.19961023131121.379f5d18@dmeasc.rc.ipt.br>
Message-Id: <Pine.SUN.3.91.961024134557.9865D-100000@is>
Mime-Version: 1.0

On Wed, 23 Oct 1996, Cesar Scarpini Rabak wrote:

> SO IMHO we are back to the initial question? What other tricks should we use
> to know if there is in fact a physical drive for the floppy?
> 
> The way we used a time ago was to trap int 24h and try to stat the 'nul'
> file in A:\ (if there is any disk there, them this file exists due MS-DOG
> way of working.

The `getmntent' function from DJGPP library does this (albeit by a
different technique, since some DPMI hosts don't like Int 24h).  But this
thread started when somebody wanted to know how to detect a drive even if
there is no disk inside, so both `getmntent' and the Int 24h method are
inappropriate. 

If you want to know whether a drive *could* be made available (as opposed 
to a disconnected or otherwise physically absent drive), there is no 
single way to do it AFAIK.  Floppy drives can be accessed on a BIOS or 
I/O registers level even if they are empty; MSCDEX has its set of IOCTL 
calls that work even when the drive is empty; networked drives can be 
queried by their own (and mutually incompatible) methods.  Tough.  The 
right answer depends on what exactly are you looking for.

- Raw text -


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