delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/10/19/11:20:38

Date: Sun, 19 Oct 1997 17:14:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
cc: djgpp-workers AT delorie DOT com, ralf AT pobox DOT com
Subject: Re: Detecting fat32 drives.
In-Reply-To: <199710162127.KAA25018@teleng1.tait.co.nz gatekeeper.tait.co.nz>
Message-ID: <Pine.SUN.3.91.971019171415.27221Q-100000@is>
MIME-Version: 1.0

On Fri, 17 Oct 1997, Bill Currie wrote:

> I don't know how reliable this is, but I just found out how to detect 
> fat32 drives: attempt to read sector 0 (or any other, I imagine) 
> using int 25,cx=0xffff. This will return with carry set and ax==1 
> (invalid function) if the drive/partition is fat32.  This function 
> works as normal for non-fat32 drives (floppies, anyway).

To make sure it is indeed robust enough to be included in the library
(if we need it), you will have to try it on other types of drives as
well.  CD-ROM, networked drives, NT drives, and DOSEmu environment are
the things that come to mind.  We need to know how these react to
Int 25h.

> It seems W95 (IFSMGR?) remaps int 25/26 to 
> int 21/7305 when accessing floppy drives (or non-fat32 drives??) or 
> does the access itself

Doesn't this defeat the above test?  If Windows does such remapping,
the call will succeed even on FAT32 drives, when you issue it from the
DOS box, no?

- Raw text -


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