Mail Archives: djgpp/1996/10/24/08:13:08
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 -