delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/09/14/05:22:01

Date: Tue, 14 Sep 1999 10:31:24 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Subject: Re: FAT32 detection
In-Reply-To: <199909122111.XAA25805@father.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.990914102639.17516A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 12 Sep 1999, Martin Str|mberg wrote:

> I forgor to check on my version of DOZE 6.22. Here's a new version of the
> program. Feedback from earlier versions of DOZE would be valuable.

On Windows 95: FAT16 hard disk and floppy disk both work (the latter
reports FAT12, as expected).  CDROM and a networked drive both fail
(getfatsz returns -1).

On NT 4.0sp3: A: returns FAT12, but H: (a networked disk mounted via NFS) 
returns FAT16.  I guess you need to check for the drive type explicitly.
Also, C:, an NTFS partition, returns FAT16.  What do we want an NTFS 
partition to return?

I will try on DOS 5.0 tonight and let you know.

Allow me a comment on the code:

      if( number_of_clusters < 4085 )
      {
	size = 12;
      }
      else if( number_of_clusters < 65525 )
      {
	size = 16;
      }
      else
      {
	size = 32;
      }

Is the above logic safe?  For example, are all FAT12 floppies less
than 4K clusters?  What about the Microsoft 2MB format?  Also, can't
there be a FAT32 volume with less than 64K clusters?

- Raw text -


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