Date: Thu, 24 Oct 1996 13:52:20 +0200 (IST) From: Eli Zaretskii To: Cesar Scarpini Rabak Cc: Simon Oke , djgpp AT delorie DOT com Subject: Re: Drive Help In-Reply-To: <1.5.4.16.19961023131121.379f5d18@dmeasc.rc.ipt.br> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.