>> I don't know of a direct or fool-proof way to detect FAT32 support, >> but maybe somebody else has come up with something. > > I believe DJGPP utils (2.04 beta or newer, e.g. 2.05 current) use > the naive method of "only assume FAT32 if DOS version is 7". (By > this I mean "du.exe","df.exe" etc. will then use INT 21h, 7303h.)
That was the way I tried it at first, too, and it really doesn't work. FAT32 first showed up in Windows 95B (not Windows 95) so the DOS version test doesn't work reliably. Relying on a DOS version for specific features or internal structure characteristics just generally isn't very reliable, except with early versions of DOS where MS and IBM were the only manufacturers. As more competitors entered the fray identifying the specific manufacturers and versions and their compatibilities became almost impossible. It's even worse now with the advent of Virtual Machines. > "INT 21 - Windows95 - FAT32 - GET EXTENDED FREE SPACE ON DRIVE" > * http://www.delorie.com/djgpp/doc/rbinter/id/40/32.html I just did a little bit of testing with that one and it has some potential. At least under MS-DOS 7.1 (Windows 98) and FreeDOS 1.3, it returns valid information even for FAT16 partitions. But under DOSBox it returns an error even when accessing a real FAT32 partition. I'll need to experiment with that one a little more -- it may be a better option than what I'm doing now, or I may need to do multiple tests. > What about INT 21h, 71A0h? (Admittedly, it may assume the Win95 LFN > API is available.) > >"INT 21 - Windows95 - LONG FILENAME - GET VOLUME INFORMATION" > * http://www.delorie.com/djgpp/doc/rbinter/id/23/32.html That is actually an LFN function, not a FAT32 function. A lot of people think LFN and FAT32 are "cousins" since they both showed up at around the same time, but you can have one without the other. Even a floppy disk (FAT12) can have LFNs. Also, not all LFN features are supported by all LFN drivers. I think INT 21.71A0 may only be supported by Windows itself and not by the "aftermarket" LFN drivers (DOSLFN, LFNDOS, StarLFN, etc.), but don't know for sure. The way I detect LFN support is with INT 21.7147 (LFN - Get Current Directory) which seems to work with all LFN drivers. _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel