=============
INTRODUCTION
=============

The universal FAT (FAT12/FAT16/FAT32/exFAT) IFS DRIVER FOR OS/2 and OS/2-based systems:
--------------------------------------------------------------------------------------

This project is based on the original FAT32 source code by Henk Kelder who was
kind enough to release the source to Netlabs (netlabs.org) in January 2002
because he no longer uses OS/2.  As a result, it is now a Netlabs project with
the full source code always available.

The FAT32 homepage at http://trac.netlabs.org/fat32/ provides both a simple zip 
file and a WarpIN package which will install FAT32 without much effort on the 
users part.

Please note that Arca Noae distributes a stripped-down version without exFAT 
support, for legal reasons. To get a full-featured version, please refer to 
the official project home page, which is mentioned above.

Authors:
Henk Kelder: original author
Brian Smith: contributor
KO Myung-Hun: main developer for the FAT32 IFS driver
Alfredo Fernndez Daz: creator of the WarpIN Script for FAT32 and contributor
David Graser: creator of the FAT32.INF file
Lars Erdmann: developer 
Valery V. Sedletski: FAT32 IFS version 0.10 developer

User's and developer's resources:   
Project bugtracker: http://trac.netlabs.org/fat32/report/6 
Mailing list for users: https://groups.yahoo.com/neo/groups/fat32user/info 
Mailing list for developers: https://groups.yahoo.com/neo/groups/fat32dev/info 
SVN repository: http://svn.netlabs.org/repos/fat32/trunk 
Builds archive: ftp://osfree.org/upload/fat32/ 
  
Remember that patches are always welcome. If anyone would like to contribute,
feel free to contact Netlabs.


===========
DISCLAIMER
===========

I allow you to use all software in this package freely under the condition that
the author, contributors, and myself are in no way responsible for any damage or
loss you may suffer.

You should be aware of the fact that FAT32.IFS might damage the data stored on
your hard disks.

If you cannot agree to these conditions, you should NOT use FAT32.IFS!

Adrian Gschwend @ netlabs.org


==============================================
MAKING OS/2 RECOGNIZE FAT32 PARTITIONS:
==============================================

EComStation and OS/2 by themselves do not recognize FAT32 partitions.  This means
that installing the FAT32 IFS (installable file system) is useless if we cannot
make OS/2 recognize them. There are several ways this is done.

Logical Volume Manager (LVM)
Partition Support Packages for non-LVM Systems

Note:  Once recognized, FAT32 partitions already formatted by Windows systems
should be readily accessible after this FAT32 driver is installed and loaded.
accessible after this FAT32 driver is installed and loaded.

LOGICAL VOLUME MANAGER (LVM):
-----------------------------

EComstation, Warp Server for e-business, and the convenience packages come with
a Logical Volume Manager (LVM) to recognize the FAT32.IFS.

The Logical Volume Manager (LVM), a disk management tool, replaces the Fixed
Disk utility (FDISK). It is used to create volumes and partitions, assign drive
letters, span a disk across physical hard drives, and define volumes that
include multiple hard drives

LVM must be used to create either a 'bootable volume" or a "compatibility
volume" for your FAT32 partitions.  If the FAT32 partition contains a version of
the Windows operating system, and you want to boot to it, then you must use LVM
to create a "bootable volume". In addition, the IBM Boot Manager is also
required to boot to your Win9x partition. If the FAT32 partition contains data
that you wish to manage, then use LVM to create a "compatibility volume". It is
also possible to run Windows programs from a bootable or compatibility volume
using ODIN.  After the creation of the volumes, assign them drive letters.

Warning: Do not use DANIDASD.DMD, PARTFILT.FLT, or the modified OS2DASD.DMD with
these systems!


PARTITION SUPPORT PACKAGES FOR NON-LVM SYSTEMS:
------------------------------------------------

For this installable file system to access FAT32 media, first eCS/OS2 has to be
able to assign them a drive letter. You already can do this in LVM systems. For
non-LVM systems you need a "partition support" package.  Presently, there are
three such packages available.

Daniela Engert's enhanced DANIDASD.DMD, a replacement for the OS2DASD.DMD found
in OS/ 2 3 and 4. This is the preferred choice for non-LVM systems.

Deon van der Westhuysen's PARTFILT.FLT, a BASEDEV FILTER to "fake" partitions
that are not normally unsupported by OS/2. It is obsolete with DANIDASD.DMD
being a much better choice.

Henk Kelder's modified version of OS2DASD.DMD., another replacement for the
OS2DASD.DMD found in OS/2 3 and 4. It too is obsolete with DANIDASD.DMD being a
much better choice.

==================================
Daniela Engert's Enhanced DASD Manager
=================================

SYNOPSIS:
---------

Slightly enhanced version of the OS/2 DASD manager OS2DASD.DMD to ease
coexistence with WinXY systems. Supports some limited form of logical volume
management.

DESCRIPTION:
------------

This release of Daniela's DASD Manager driver is based on the OS2DASD.DMD
sources provided by IBM on their DDK site. It has the latest feature set as
found in the current fixpacks.


AVAILABILITY:
------------

Daniela's driver can be found on Hobbes at:

http://hobbes.nmsu.edu/pub/os2/system/drivers/storage/danidasd144.zip

There may eventually be a WarpIN (wpi) version available at Hobbes in the same
location as the zip file.

CAUTION:   
--------

DaniDASD.DMD is made for non-LVM systems only! 
It does not work with OS2LVM.DMD! 
It cannot overcome limitations of FDISK or OS/2 Bootmanager! 

=============
PARTFILT.FLT:
=============

PARTFILT is based on the excellent work of Deon van der Westhuysen. Henk Kelder
made only minor modifications to it. The source code is available under GPL
conditions and can now be downloaded from the Netlabs.

Also, once PARTFILT is installed FDISK, Partition Magic and other Partition
tools can no longer be trusted. Do not use these tools once PARTFILT is
installed.

PARTFILT.FLT is a BASEDEV FILTER device that is able to present (fake) partition
types that are normally unsupported by OS/2 in such a way to OS/2 that IFS's can
be loaded on these partitions. Such virtualized partition will always be mounted
after the non-virtualized partitions.

The best location in the config.sys seems to differ depending on your
configuration. Some state FAT32.IFS will only work is PARTFILT is the first
basedev, others claim it only works if PARTFILT is the last one.

A specific problem was reported when using a SCSI power save basedev that only
seemed to work if PARTFILT was the last basedev.


AVAILABILITY:
-------------

The partfilt.flt driver will NO longer be distributed with the FAT32 IFS driver.
 If needed, it can be extracted from Henk's latest binary release and manually
installed entirely at the user's own risk. Henk Kelder's last release can be
found on Hobbes at:

http://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/os2fat32.zip


INSTALLATION:
-------------

Note:  This driver is obsolete with Daniela's DaniDASD.DMD being the better
choice.  However, if one prefers this driver, it can be installed doing the
following.

Copy the partfilt.flt driver to your \OS2\Boot directory.

Add the following line to the config.sys file:

BASEDEV=PARTFILT.FLT /P 0B [/W]

(The /W should not be specified if you do not want write access) (The best
location seems to differ depending on your configuration. Some state FAT32.IFS
will only work is PARTFILT is the first basedev, other claim it only works if
PARTFILT is the last one.) PARTFILT.FLT might need other options IF you have
converted an existing FAT16 partition to FAT32 or if you want to influence the
drive order! This manual install will add FAT32 partition after all existing
drives.

Reboot.

============
OS2DASD.F32:
============

This is a modified version of OS2DASD.DMD found in OS/2 and is an alternative
for using PARTFILT.FLT. This modified driver also allows FAT32 partitions to be
recognized by OS/2.

Note:  This driver is NOT at the latest level and will probably NOT support the
latest features like removable disks, etc...


AVAILABILITY:
-------------

The OS2DAD.F32 driver will NO longer be distributed with the FAT32 IFS driver.
 If needed, it can be extracted from Henk's latest binary release and manually
installed entirely at the user's own risk. Henk Kelder's last release can be
found on Hobbes at:

http://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/os2fat32.zip


========================
Formatting FAT32 Volumes
========================

Formatting FAT32 can be done numerous ways. Presently, the only way to format a
volume FAT32 under either eComStation or OS/2 is to use DFSee and F32blank together.
The procedure is as follows:

 1.Find out the volume relevant data: Heads, Sectors, Starting point and Size using DFSee
 2.Feed F32Blank with that data to generate a file with blank FATs suitable for the volume
 3.Detach the volume (with LVM it's called 'hide' or similar)
 4.Use DFSee to overwrite the volume with the file contents, using "wrim".
 5.Attach again the volume.
 6.If after this you can't read/write properly the volume or it appears as not empty,
 then you MUST reboot and check it again.
 7.If you don't like DFSee go and find something else capable of doing the job.

If this is too complicated for some people, the USB media can be formatted using one
of the Window's versions. Each Windows version has it own built in limitations.

Win95R2 <= 16 GB
Windows 98 second addition - Volumes < 128 GB and > 512 MB
Windows ME - 512 MB to 2 TB.
Windows XP <= 32 GB.

Other formatting alternatives

FreeDOS <= 16 GB
Partition Commander versions 8 and 9 (Limitations unknown)

Native OS/2 programs, allowing to format FAT32 disks:   

Reformat, by Glassman (http://ru.ecomstation.ru/projects/disktools/?action=reformat) 
DFSee 8.x and later, by Jan van Wijk (http://www.dfsee.com/). 

Since FAT32.IFS 0.10, new FORMAT routine is supported. We ported to OS/2 a Windows 
program called Fat32Format. (http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm).
Now it enhanced to support all FAT flavours supported, that is: FAT12, FAT16, FAT32, EXFAT. 
  
The procedure of formatting is straightforward: you just use FORMAT.COM with /FS:<file system type>   
  
Where <file system type> is one of the following: FAT12|FAT16|FAT32|EXFAT   

Note that, by specifying the "FAT" file system type to FORMAT.COM, you still can access IBM's 
standard FAT FORMAT routine, which supports checking for bad sectors and formatting on physical 
level (our format supports only "quick"/"high-level" format at the moment, but it has its own 
advantages too).  

Also, there is PMFORMAT, written by Alex Taylor. It is a PM frontend for FORMAT routine of 
uunifat.dll. This frontend is included in ArcaOS.

INSTALLATION:
-------------

Note:  This driver is obsolete with Daniela's DaniDASD.DMD being the better
choice.  However, if one prefers this driver, it can be installed doing the
following.

To install, rename you OS2DASD.DMD to something else, such as Old_os2dasd.dmd.

Copy the OS2DASD.F32 to the \OS2\Boot directory.

Rename it OS2DASD.DMD.

Reboot.

========================
INSTALL/DEINSTALL:
WARPIN INSTALL\DEINSTALL
========================

WARPIN INSTALLATION OF FAT32 DRIVER:
------------------------------------

The latest version of WarpIN is required and can be downloaded from:

http://www.xworkplace.org

Install WarpIN if not already installed.
If using a LVM system, create a compatibility volume and assign it a drive
letter.
Go to the location where you downloaded the *.wpi file.
Double click to start the installation.
When installation is completed, the installation will have copied the following
files to your OS/2 partition:

Note: The placement of files is not relevant to install/deinstall. WarpIN will
take care of that.
The default directories will be BIN, BOOK, DLL, and BOOT under <ESES_dir> if the
base ESE is installed, otherwise the defaults will be ?:\OS2, ?:\OS2\BOOK,
?:\OS2\DLL, and ?:\OS2\BOOT. If you choose other paths, WarpIN will add them to
your PATH/LIBPATH, etc..

Possible directories of file placement:

Files                    Destination

CACHEF32.EXE            \TOOLS\SYSTEM\BIN

F32STAT.EXE             \TOOLS\SYSTEM\BIN

F32MON.EXE              \TOOLS\SYSTEM\BIN

F32PARTS.EXE            \TOOLS\SYSTEM\BIN

FAT32.IFS               \TOOLS\SYSTEM\BOOT

LOOP.ADD               \TOOLS\SYSTEM\BOOT

UUNIFAT.DLL and forwarders \TOOLS\SYSTEM\DLL

FAT32.INF               \TOOLS\SYSTEM\BOOK

FAT32.TXT               \TOOLS\SYSTEM\BOOK

FAT32.KOR               \TOOLS\SYSTEM\BOOK (Only if you chose to install Korean support)

COUNTRY.KOR             \OS2\SYSTEM  (Only if you chose to install Korean support)

CACHEF32.CMD            \TOOLS\SYSTEM\BIN (Only if you chose to install Korean support)

WarpIN also adds the following lines to the config.sys file:

ifs=X:\TOOLS\SYSTEM\BIN\FAT32.IFS /cache:2048 /h /q /ac:* /largefiles
call=X:\TOOLS\SYSTEM\BIN\CACHEF32.exe /f /p:2 /m:50000 /b:250 /d:5000

Where X: is the partition that the IFS will be installed to.

Note:  WarpIN makes a backup of your config.sys file to your root directory. If
the system has problems booting up after installation, you can always boot to a
command prompt using the boot recovery menu. Replace the modified config.sys
file with the backup that was made during the fat32 install to get you back up
and running again.

Reboot


KOREAN SUPPORT for NON-KOREAN SYSTEMS:
--------------------------------------

The Korean installation does several additional things:

-Besides copying the standard FAT32 files to the selected location(s) and making
the default config.sys entries (See WARPIN INSTALLATION OF FAT32 DRIVER), it
will install COUNTRY.KOR but NOT point the config.sys to use it. You have to do
so manually, and in case of problems, the fallback Alt+F1,F2 solution will still
point to the original COUNTRY.SYS and thus will be safe. See "Files in this version".
-adds a Korean text dealing with FAT32 information.
-copies a CACHEF32.CMD file to the hard drive which contains the following
script:

chcp 949
CACHEF32.EXE /y

It adds the following entry to the startup.cmd file found in the root directory
cmd /C CACHEF32.CMD

Note:  The reason cmd /c is used is because 4os2 does not support CHCP
correctly.

IMPORTANT!  If you install Korean support for non-Korean systems, you'll have to
manually edit your CONFIG.SYS and change the COUNTRY settings from

COUNTRY=xyz,?:\OS2\SYSTEM\COUNTRY.SYS

to

COUNTRY=xyz,<Install Path>\COUNTRY.KOR

where you have to substitute xyz and <Install Path> with appropriate values. In
case of problems, the fallback Alt+F1,F2 solution will still point to the original
COUNTRY.SYS and thus will be safe. See "Files in this version".

Note: Korean filenames are displayed correctly only in CP949, but filenames are
manipulated correctly regardless of current codepage.


DEINSTALLATION USING WARPIN:
----------------------------

If the Fat32 IFS was installed using WarpIN, use WarpIN to uninstall it and its
associated files.

To Uninstall:

1. Start WarpIN

2. Under the Application column, find the IFS. Check the Vendor column and make
sure it states "Netlabs".

3. Select.  The WarpIN data base should show the following information:

Note:  The number of files to uninstall will vary depending on the FAT32 version
installed and if Korean support was installed.

List                     Information

Author.                   Netlabs.

Version number:           0.9.9.2

Installation date:        The date you installed it Target directory: <drive>:\OS2

Files:                    8

4. Right click on "IFS".

5. Select "Deinstall package...".  A message box should come up listing what will
be deleted and undone.

6. Select "OK"

Note:  WarpIN sometimes has problems deleting the added config.sys entries.

This usually happens after you install over a previous version. If this
happens, you will have to manually edit your config.sys file and remove the
following entries.

IFS=X:\TOOLS\SYSTEM\BOOT\FAT32.IFS [...]
CALL=X:\TOOLS\SYSTEM\BIN\CACHEF32.EXE


MANUAL MANGLING:
------------------

If archived in zip form, unzip the files to a temporary directory. If in WarpIN
format, do the following:

Copy the *.wpi file to a temporary directory.  Copy the files "wic.exe" and
"wpirtl.dll" from your WarpIN directory to the temporary directory where you
copied the *.wpi file. To extract the fat32 files, open a command prompt, change
to the temporary directory, and type the following command:

wic.exe *.wpi -x (x is lowercase).

Replace the *.wpi with the name of the fat32 wpi file.

After the files have been extracted, do the following:

Note:  If you installed the FAT32 driver version 0.96 or higher using WarpIN and
now wish to install the update manually, check your WarpIN database to see where
each file is located. Copy the files to the locations (directories) indicated in
the WarpIN database.

If you installed the FAT32 driver versions 0.95 or earlier either manually or
using WarpIN, copy the following files to your \OS2 directory:

CACHEF32.EXE 
DISKDUMP.EXE 
F32STAT.EXE 
F32PARTS.EXE 
F32MON.EXE 
F32CHK.EXE 
FAT32CHK.EXE 
FAT32FMT.EXE 
FAT32S

Copy the following file to your \OS2\DLL directory:

UUNIFAT.DLL / UFAT12.DLL / UFAT16.DLL/ UFAT32.DLL / UEXFAT.DLL / QEMUIMG.DLL

Copy the following files to your \OS2\BOOT:   

FAT32.IFS

LOOP.ADD

Copy documentation files to your \OS2\DOCS\FAT32 directory: 
  
Copy *.INF files to your \OS2\BOOT directory:

IFS.INF
FAT32.INF

There is a document for Korean based on version 0.94 document.  This is not
needed unless you are Korean.

FAT32.KOR

The following file is a patched version of the "country.sys" from WSEB fixpack
2.  Strangely, "country.sys" of WSeB contains the wrong information for Korean,
especially DBCS lead byte infos.  Without this, Korean cannot use filenames
consisting of Korean characters.  Replacement the country.sys file found on
Korean systems is a must for the FAT32.IFS to work correctly.  On non-Korean
systems, replacement of the country.sys is not necessary, but can be done if the
installer wants without any harm to their systems.  To use, rename the
"country.sys" found in OS2\SYSTEM directory and replace it with the
"country.kor", renaming it "country.sys".

COUNTRY.KOR

This script adds Korean CODEPAGE support for non-Korean systems. Copy it to a
location listed in the PATH statement of your config.sys.  Add its location to
the STARTUP.CMD found in your root directory.  If you have no STARTUP.CMD, make
one.

CACHEF32.CMD

Make the following changes to the CONFIG.SYS:

IFS=x:\OS2\FAT32.IFS [options]
(Install this one anywhere AFTER IFS=HPFS.IFS)

CALL=x:\OS2\CACHEF32.EXE [options]

Note:  Make sure this is a CALL and NOT a RUN.


===================================
FAT32 IFS COMPONENTS AND SWITCHES:
===================================

FILES IN THIS VERSION:
--------------------

FAT32.INF             This file.

FAT32.TXT             Fat32 information in plain ASCII txt format (may be outdated).

FAT32.IFS             The actual IFS.

CACHEF32.EXE          The cache helper program.

UUNIFAT.DLL and forwarders Modules needed to run CHKDSK/FORMAT/SYS on FAT32 partition.   

F32CHK.EXE            A boot disk autocheck helper.   

F32STAT.EXE           A program to change the DIRTY flag of FAT32 partitions.

F32MON.EXE            (Formerly MONITOR.EXE) A program to monitor what FAT32.IFS is doing.
doing.

F32PARTS.EXE          (Formerly DISKINFO.EXE) A diagnostic program that will scan for and show all
                      and show all partitions.

FAT32FMT.EXE          Disk formatter standalone version.   

FAT32CHK.EXE          Disk checker standalone version.

FAT32SYS.EXE          Boot loader installer standalone version. 

* FAT32.KOR           Is a document for Korean based on version 0.94 document and updated.
                      updated.

* COUNTRY.KOR         A patched version of the "country.sys" from WSEB fixpack 2. Strangely,
                     "country.sys" of WSeB contains the wrong information for Korean, especially DBCS
                      lead byte infos. Without this, Korean cannot use filenames consisting of Korean
                      chars. To use, rename the "country.sys" found in OS2\SYSTEM directory and
                      replace it with the "country.kor", renaming it "country.sys".

* CACHEF32.CMD        Script for loading Korean Codepage and CACHEF32.EXE


FAT32.IFS:
----------

FAT32.IFS is the actual Installable File Systems (IFS) driver. It is installed
by specifying the path and complete file name of the file system driver in your
CONFIG.SYS file like this :



IFS =   filename ´
          drive   path               arguments 


Examples

The defaults (i.e.e no parameters specified ) are a cache of 1024KB and no
messages.

IFS=X:\TOOLS\SYSTEM\BIN\FAT32.IFS /Q

To set a cache of to 2048KB with Extended Attributes support, type the following
in your CONFIG.SYS and restart your system.

IFS=X:\TOOLS\SYSTEM\BIN\FAT32.IFS /cache:2048 /EAS

Note:  If no FAT32 partition is found on system startup, the driver will not
load.


FAT32 IFS OPTIONS:
-----------------

Options Description

/Q                       Quiet, no messages.

/H                       Allocates cache memory into high memory (>16MB). Option added
                         starting with version 0.99.

/CACHE:nnnn              Specifies the cache size in kilobytes. If omitted the default
                         cache size is 1024KB. Maximum cache size is 2048KB. *

/CALCFREE                Because FAT32 always calculates free space on mount of USB removable
                         media, recognition of the media was taking a long time. The default now
                         for the FAT32 driver is not to calculate free space unless this option is
                         enabled or if free space info was.

                         Note:  Cache memory is allocated as FIXED memory, so if you have
                         less than 16MB a setting of 512KB or less for this option is suggested.

/AUTOCHECK:<drive letter list> Specifies the drive letters to check on boot. If /AUTOCHECK:* is 
                         specified, CHKDSK will check all FAT32 disks for dirty flag present, and 
                         if it is, CHKDSK is run on that drive. The drive letters can be specified 
                         also one by one, like this: /AUTOCHECK:cdwx. Also, there's the possibility 
                         to force chkdsk run on boot, regardless of the dirty flag, by specifying 
                         the plus sign after the drive letter: /AUTOCHECK:cdf+h. So that, disk f: 
                         will be checked forcibly.   

/AC:<drive letter list>  The same as /AUTOCHECK:<drive letter list>.   

/LARGEFILES              Large files support: Support files of size >2 GB. It is off, by default. 
                         Note that the file size limit for FAT32 set by Microsoft is 4GB (as file 
                         size is an unsigned long integer). But 16-bit IFS drivers have another 
                         limit of 2 GB per file, because file position is signed long integer. 
                         Starting from OS/2 Warp Server for e-Business, IBM introduced support 
                         for files > 2 GB with 64-bit file position. So, the file size could be 
                         almost unlimited, theoretically. This switch defines, whether to use 
                         the support for large files or not. If this switch is specified, but 
                         large file API is unavailable, the large file support forced to be 
                         disabled. This prevents trying to use the missing 64-bit fields for file 
                         size and position on older systems.   

/FAT[:[-]<drive letter list>] Enable FAT12/FAT16 support. You can optionally specify the drive letters 
                         which are needed to mount. (Like /fat:abcd or /fat:* or /fat:-abcd). Minus 
                         denotes that the following drive letters should be disabled, so this is a 
                         "blacklist"-type mask.

/FAT32:[-]<drive letter list> Enable FAT32 support for a list of drive letters. Minus denotes that the 
                         following drive letters should be disabled, so this is a "blacklist"-type mask.

/EXFAT[:[-]<drive letter list>] Enable exFAT support. You can optionally specify the drive letters which 
                         are needed to mount. (Like /exfat:abcd or /exfat:* or /exfat:-abcd). There is an 
                         support for exFAT filesystems. (beta-quality). Minus denotes that the following 
                         drive letters should be disabled, so this is a "blacklist"-type mask.

/PLUS                    Enable FAT+ support (large files, bigger than 4 GB).   

                         Note: If /FAT or /EXFAT or /FAT32 switches are not specified, all FAT32 disks 
                         are mounted by default. FAT12/FAT16 should work on any media. Floppies can be 
                         mounted too. Also, so far, we tested a CD with FAT16 filesystem burned on it, 
                         it works too. We just created the test filesystem with QSINIT, with 2048 bytes 
                         per sector (QSINIT supports such an option), then saved it as an image and burned 
                         it as a standard ISO image. Also, virtual floppy or hard disk should work too. So 
                         far, the following drivers were successfully tested with fat32.ifs: VDISK.SYS by 
                         IBM (included into each OS/2 system), VFDISK.SYS by Daniela Engert and Lars Erdmann, 
                         and SVDISK.SYS by Albert J. Shan, HD4DISK.ADD by _dixie_ (included with QSINIT boot 
                         loader). The latter is successfully tested both with FAT32 PAE ramdisks and with EXFAT 
                         ramdisks in lower memory.   

/MONITOR                 Set F32MON ON by default. If omitted F32MON is OFF. See F32MON.EXE
                         for more information.

/RASECTORS:n             Read Ahead Sectors. Specifies the minimum number of sectors to be
                         read per read action and placed in the cache. If omitted the default
                         differs per volume and equals 2 times the number of sectors per cluster.
                         The maximum threshold value used is 4 times the number of sectors per
                         cluster. The maximum value of RASECTORS has been changed from 4 times
                         the number of sectors per cluster to 128 starting with version 0.96.

                         Note:  The actual sector IO per read action is NOT determined by an
                         application, but by the IFS. For FAT access, single sector reads are
                         done. For Directory and Files IO reads are done on a cluster base.
                         By setting the RASECTORS, you can define the minimum number of sectors
                         the IFS will read from disk and place in the cache.

/EAS                     Make FAT32.IFS support EXTENDED ATTRIBUTES

                         IMPORTANT:  Starting with version 0.97, CHKDSK /F must first be run on
                         each FAT32 partition before adding EA support to the FAT32 IFS driver.
                         This step is required starting with this version due to the EA mark byte
                         being changed for compatibility with WinNT family.

                         Starting with version 0.98, EA support is turned OFF by default in WarpIN
                         installations.

                         You can use F32STAT.EXE to run CHKDSK automatically on next boot by doing
                         the following.

                         F32STAT.EXE x: /DIRTY

                         Where, x: is your FAT32 drive which has files with EA.

                         F32STAT.EXE supports only one drive at one time. So if you want to change
                         the state of one more drive, you should run F32STAT.EXE, respectively.
                         i.e., FAT32 drive is C: D:. You should run F32STAT.EXE two times for C and
                         D as the following.

                         F32STAT.EXE C: /DIRTY
                         F32STAT.EXE D: /DIRTY

FREE SPACE:
------------

On most FAT32 drives the amount of free space is stored. FAT32.IFS will only
redetermine the amount of free space if:
The disk was marked dirty on boot.
The free space is set to -1 on the disk.
The free space is not available on the disk.

FAT32.IFS will internally keep track of the free space and update it on disk on
shutdown.

LOOP.ADD
---------

LOOP.ADD is the block device driver (Adapter Device Driver) for mounting disk images
laying on an another file system. It allows to mount a disk image with any available
IFS (besides FAT32.IFS). So, after attaching the image with F32MOUNT.EXE, a block 
device appears in the system, which gets a drive letter assigned and then the kernel
calls all IFS FS_MOUNT entry points, until it gets mounted.

LOOP.ADD contains the same functionality that FAT32.IFS contains, needed to mount
disk images. For successfull image mount, you need a running instance of CACHEF32.EXE
which loads QEMUIMG.DLL to mount disk images. So that, as in FAT32.IFS case, we
have CACHEF32.EXE running a loop, polling LOOP.ADD with a "GET_REQ" ioctl. If an 
OPEN/CLOSE/READ/WRITE command is available, it executes it and returns back into the driver
with an "DONE_REQ" ioctl&per. An actual file system is mounted to a block device served by
LOOP.ADD. 

Syntax:

BASEDEV =   LOOP.ADD ´
                          arguments 


Options Description:

/UNITS:<number of units>     Number of units to serve.

This specifies how many images can be mounted at once. For each image a block device
should be allocated&per. The number of block devices is fixed at the moment of loading the 
driver.

Examples:

BASEDEV=LOOP.ADD /UNITS&colon.3


THE PURPOSE OF CACHEF32.EXE
----------------------------

CACHEF32.EXE is a helper program with the following functions:

- Check DISK state on boot, run CHKDSK if needed (but since FAT32.IFS 
versiom 0.10, CHKDSK is no more run from CACHEF32.EXE. It is run
from the IFS FS_INIT routine, as it should be)&per.
- Start the LAZY WRITE daemon&per. 
- Set CACHE and READ-AHEAD parameters.
- Set Longname behavior.
- Load a CP to UNICODE translate table for longnames and the default codepage.
(Unicode translate table loading is moved to UUNIFAT.DLL. Now CACHEF32.EXE just
calls corresponding function in this DLL.)
- CACHEF32.EXE also runs a special helper thread executing a loop polling the IFS 
for OPEN/READ/WRITE/CLOSE commands. So, this thread executes these commands and returns 
results back to the IFS. This is required to support reading/writing sectors from/to 
disk images laying on another file system&per. For reading the disk images, CACHEF32.EXE 
uses QEMUIMG.DLL, which contains the disk image access code ported from QEMU 
(http://www.qemu.org/).
- CACHEF32.EXE is also running another thread, executing a second loop polling
the LOOP.ADD for OPEN/READ/WRITE/CLOSE requests. So, this thread executes these
commands and returns results back to the driver. This is required to support reading/
writing sectors from/to disk images laying on another file system. For reading the 
disk images, CACHEF32.EXE uses QEMUIMG.DLL, which contains the disk image access
code ported from QEMU (http://www.qemu.org/).
- CACHEF32.EXE also forces all FAT12/FAT16 drives to be remounted on startup.
This is needed to cause these drives remounted by FAT32.IFS, instead of the
in-kernel FAT driver. This is to avoid manual remount each time.
- CACHEF32.EXE also starts F32MOUNT.EXE with "/a" parameter, to automatically
mount all images specified in d:\os2\boot\fstab.cfg on startup, and also starts
F32MOUNT.EXE with "/u" parameter on exit, to automatically unmount all images.

When run in the foreground and CACHEF32 is already running, it displays the
CACHE parameters and allows you to modify the values. If no other copy of
CACHEF32 is running, it detaches a background copy.

When run in the background (detached), CACHEF32 will act as lazywrite daemon.


CACHEF32 OPTIONS:
-----------------

/?             Shows help.

/Q             Terminates CACHEF32. CACHEF32 will be unloaded from memory,
               lazy writing will stop. (Performance will degrade).

/N             Runs CACHEF32 without starting the deamon in the background.

/D:nn          Sets the DISKIDLE value. See OS/2 online help on CACHE.

/B:nn          Sets the BUFFERIDLE value. See OS/2 online help on CACHE.

/M:nn          Sets the MAXAGE value. See OS/2 online help on CACHE.

/R:d:,n        Set RASECTORS for drive d: to n.

/L:ON|OFF      Set lazy writing ON or OFF, default is ON

/P:1|2|3|4     Set priority for lazy writer. 1 is lowest, 4 is highest.
               Default 1(=idle-time). This might be handy if the lazy-writer
               doesn't seem to get any CPU due to heavy system load.

/Y             Assume Yes

/S             Do NOT display normal messages

/CP            Specify codepage in paramter

/F             Forces CACHEF32.EXE to be loaded even if no FAT32 partition is
               found on startup. Added starting with version 0.99.


Note: The /T option was removed in version 0.83.
      The /FS option was removed in version 0.98.
      The /FL option was removed in version 0.98.


--------------------------
UUNIFAT.DLL and forwarders
--------------------------

UUNIFAT.DLL and four forwarder DLL's: UFAT12/FAT16/FAT32/UEXFAT UUNIFAT.DLL is FAT file 
system utility DLL. It currently supports CHKDSK, FORMAT and SYS commands. Previously, 
there was one DLL, UFAT32.DLL and it supported only FAT32 filesystem. Now FAT32.IFS 
supports different kinds of FAT, like: FAT12, FAT16, FAT32, EXFAT. Since then, all 
functionality was moved to a single UUNIFAT.DLL. If user calls "format d: /fs:fat12", 
UFAT12.DLL is loaded. UFAT12 forwards all calls to the same routines in UUNIFAT. So, all 
filesystems are handled by UUNIFAT.DLL. Note that all four kinds of FAT are handled by a 
single code, because they are very similar, and use the same routines, with a few 
differencies. So creating four almost identical DLL's is a bad idea, the same way as 
creating four IFS drivers for each FAT flavour.   

CHKDSK   

The UUNIFAT.DLL CHKDSK routine is called by chkdsk.com whenever it is issued for a 
FAT drive.   

When CHKDSK is started, there are two lines like this:   

The type of file system for the disk is FAT32.   

This one is on the second line. And then, after a couple of lines there's another like   

The type of file system for the disk is exFAT.   

The former is output by CHKDSK.COM frontend program and it shows the IFS name: FAT32.   

The latter is output by UUNIFAT.DLL and is the autodetected actual file system type. 
It can be used to see the actual FS name, when you're in trouble.   

For CHKDSK the following options are implemented:

Options         Description

/F             Fixes problems (Currently UFAT32.DLL only fixes lost clusters,
               and an incorrect free space count.)


/C             Causes lost clusters to be automatically converted to files if
               the drive was in an inconsistent state at boot (No questions asked).

/V:1           Causes CHKDSK to show fragmented files.

/V[:2]         Causes CHKDSK to show details on all files checked.(default)

/P             Serves for using with a PM frontend, like pmchkdsk.exe. If specified, 
               it writes additional messages to stdout, then a PM frontend parses them 
               and updates its controls.   

Note: At the moment, CHKDSK supports checking FAT12/FAT16/FAT32/EXFAT filesystems.   

The CHKDSK process does the following checks:

Compares all copies of the FATs;
Checks for each file the file allocation;
Checks per file or directory the VFAT long filename;
Checks for, and if /F is specified, repairs lost clusters.
Checks for, and if /F is specified, repairs cross-linked files.
Checks free space, and if /F is specified, corrects an incorrect setting.
Checks for lost extended attributes.


CLEAN SHUTDOWN CHKDSK:
-----------------------

If Windows 95 (OSR2) or later shuts down properly, the clean shutdown status of
the disk is physically written on the disk. On next boot this state is checked,
and if the disk is not shutdown properly, SCANDISK is run.

FAT32.IFS also supports this feature. When CACHEF32 is called from the
config.sys, it checks, via a call to the IFS the state of each FAT32 drive. For
each drive that is not shutdown properly, CHKDSK is fired. If no errors are
found, or if only lost clusters where found and repaired, the drive is marked
ok.

If CHKDSK cannot solve the problem, the drive state is left dirty, and NO FILES
CAN BE OPENED AND NO DIRECTORIES CAN BE ADDED OR REMOVED. Shutting down the
disk, leaves the disk marked as not properly shutdown. You should boot to
Windows and run SCANDISK on the drive to fix the remaining problems.

F32STAT however, allows you for set the drive status, bypassing the normal
handling of FAT32.IFS. See the description of F32STAT for more information.

FORMAT   
------

The UUNIFAT.DLL FORMAT routine is called by format.com frontend program whenever 
it is issued for a FAT filesystem.   

Except for UUNIFAT.DLL, there are UFAT12.DLL, UFAT16.DLL, UFAT32.DLL, UEXFAT.DLL, 
which are forwarders to UUNIFAT.DLL. They are needed to support formatting with 
"/fs:fat12", "/fs:fat16", "/fs:fat32", "/fs:exfat" switches. All functionality is 
implemented in the main DLL, and is redirected to it.   

The FORMAT routine was ported to OS/2 from Windows platform and extended to support 
FAT12, FAT16 and EXFAT filesystems. The Fat32Format program was used as a base, see 
http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm.

The Fat32Format program is licensed as GPL too, like FAT32.IFS is.   

For FORMAT the following options are implemented:   

Options     Description   

/?          Show help.   

/H          Show help.   

/R:<number> Number of reserved sectors.   

/V:<volume label> Set volume label (Max. 11 characters).   

/P          Serves for using with a PM frontend, like pmformat.exe. If specified, it 
            writes additional messages to stdout, then a PM frontend parses them and 
            updates its controls.   

/C:<number> Cluster size. The following cluster sizes are supported:   

FAT12
-----

 <number>  Max. size
 ____________________
 1         4MB
 2         8MB
 4         16MB
 8         32MB
 16        64MB
 32        128MB
 64        256MB

  
FAT16   
-----

 <number>  Max. size
 ____________________
 1         64MB
 2         128MB
 4         256MB
 8         512MB
 16        1024MB
 32        2048MB
 64        4096MB

  
FAT32   
-----

 <number>  Max. size
 ____________________
 1         128GB
 2         256GB
 4         8192GB
 8         16GB
 16        32GB
 32        >32GB
 64        >32GB

  
exFAT   
-----

 <number>  Max. size
 ____________________
 4         256MB
 32       1024MB
 128       >32GB

  
For FAT32, maximum is 128 sectors per cluster -- 64K clusters. More than 64K per cluster 
is not allowed by FAT32 spec. Clusters, larger than 64KB, are supported by exFAT. Up to 
32 MB clusters are supported. For FAT12/FAT16/FAT32, clusters should be, generally, less 
than or equal to 32 KB, but WinNT supported a FAT32 variant with 64 KB per cluster. Note 
that Win9x could behave unpredictably in case it tries to mount a FAT drive with 64 KB 
cluster. This is because number of clusters in these OS'es is a signed byte, so a division 
by zero could occur. So, if you use DOS/Win9x, please avoid using 64 KB clusters. Fat32.ifs 
supports large clusters, too, by splitting clusters, larger than 32 KB to 32 KB or lesser 
blocks. (There is a limitation of a 16-bit driver, which is the case for fat32.ifs, that 
we cannot allocate more than 64 KB of memory at once, so, we need to split to smaller blocks).   

FAT12 supports 32 MB max. volume size, 4 GB max. file size. 
FAT16 supports 2 GB max. volume size, 4 GB max. file size. 
FAT32 supports 8 TB max. volume size, 4 GB max. file size. 
exFAT supports 128 PB max. volume size, 16 EB max. file size. 
  
Note that if we'll increase a cluster size to 64 KB (instead of a 32 KB), then maximum volume 
size for FAT12/16/32 will increase twice. Also note that if using a standard MBR partition 
scheme, the maximum volume size for FAT32 and exFAT should be reduced to 2 TB (it is limited 
with a 32-bit LBA in partition table). If we'll use GPT partition table, then we can use larger 
volume sizes (but note that OS/2 is limited to an MBR partition scheme, yet).   

/FS:FAT12|FAT16|FAT32|EXFAT FAT12/FAT16 disks can be formatted using FORMAT or checked using CHKDSK too. For FORMAT, "/fs:fat12" or "/fs:fat16" needs to be specified too. "format d: /fs:fat" still invokes the standard IBM's FAT format routine. So, if you want our new FORMAT routine, just specify "/fs:fat12" or "/fs:fat16" instead of "/fs:fat". Also, "/fs:fat32" is supported for formatting into FAT32. If the "/fs" switch is not specified, the filesystem FAT12/FAT16/FAT32/exFAT is chosen based on the volume size. If it is less than 4 MB, it is FAT12. If it is less than 2 GB, it is FAT16. If it is less than 32 GB, it is FAT32. And if it is larger than 32 GB, exFAT is chosen by default. Formatting to exFAT is supported too. For that, you should specify "/fs:exfat" (possibly, together with /c:<cluster size>).   

SYS   
---

The UUNIFAT.DLL SYS routine is called by sysinstx.com whenever it is issued for a FAT drive.   

The SYS command has no parameters. At this time, it only writes the bootblock and several 
FreeLDR main files. No OS2BOOT is installed at this moment as it is not yet implemented. You 
can add more files from standard FreeLDR installation, if you need.   

The SYS command is supported for FAT12/FAT16/FAT32 at the moment.

FAT32FMT.EXE:   
-------------

FAT32FMT.EXE is a standalone version of Fat32Format. It is equivalent to FORMAT routine 
and takes the same parameters. (Look here: FORMAT.EXE for more info).  

FAT32CHK.EXE:   
-------------

FAT32CHK.EXE is a standalone version of FAT CHKDSK. It is equivalent to CHKDSK routine and 
takes the same parameters. (Look here: CHKDSK.EXE for more info).   

FAT32SYS.EXE:   
-------------

FAT32SYS.EXE is a standalone version of FAT SYS/SYSINSTX. It is equivalent to SYS routine 
and takes the same parameters. (Look here: SYSINSTX.EXE for more info).  

F32CHK.EXE:   
-----------

F32CHK.EXE is a helper for CHKDSK. It is needed for disk autocheck on boot. It takes the same 
parameters as CHKDSK itself. It is run by FAT32.IFS init routine. 


F32MON.EXE (formerly MONITOR.EXE):
--------------------------------

F32MON will show (most) FAT32 actions on screen. This program is intended for
troubleshooting. Using F32MON will degrade performance since FAT32 must send
monitoring information to an internal buffer. This internal buffer is only 4096
bytes large, so if monitoring is on, but F32MON does not run, logging
information is lost. However, this will only occur if /MONITOR is specified
after the IFS= line for FAT32.IFS.

If the /MONITOR command is not specified in the config.sys after the IFS=
statement, monitoring is OFF by default, but starting F32MON once will activate
monitoring.

When F32MON runs, information is shown on the screen, and also written to
FAT32.LOG in the current directory.

When F32MON terminates, the internal monitoring is switched off. The syntax for
F32MON is:

F32MON [tracemask] [/S]

If tracemask is omitted it is set to 1.

The tracemask exists of a specific bit to show certain types of information.
This way, you can monitor selectively.

The following values for tracemask exist:
1 - Shows all calls to FS_xxxxx entry points and the return values
2 - Shows additional (internal) function calls
4 - Shows cache related (lazy writing) function calls
8 - Shows internal memory handling (malloc & free) memory calls
16 - Shows FS_FINDFIRST/FS_FINDNEXT calls
32 - Shows some other calls
64 - Shows extended attribute handling

You should add values to see multiple groups:

e.g.
You want to see both FS_xxxx calls and cache related information. As tracemask
you should use 1 + 4 = 5.

Options     Description

/S   -     Runs without output to the screen, but only to FAT32.LOG. This is useful if
        F32MON sends so much messages to the screen that the program can't keep up with
        the IFS. Using /S only sends the output to FAT32.LOG so no time is lost in
        screen handling.


THE PURPOSE OF F32STAT.EXE:
----------------------------

F32STAT can be used to query the clean shutdown state of a FAT32 drive. It also
allows you to alter the clean shutdown state. You could use this feature if
FAT32.IFS blocks access to the disk because it is dirty on boot, and CHKDSK
could not solve the problem.

The syntax is:

   F32STAT drive: [options]

F32STAT.EXE OPTIONS:
--------------------

/CLEAN  -         Inform FAT32.IFS that the disk was clean on boot and may be
                  used. The disk itself will be marked as clean on a succesfull
                  shutdown. (The internal dirty flag FAT32.IFS uses will be cleared.)

/FCLEAN   -       Inform FAT32.IFS that the disk was clean on boot and may be used.
                  The disk itself will also be marked as clean at that moment. The
                  internal dirty flag FAT32.IFS uses will be cleared, but the marking
                  on disk will also be set ok.)

/DIRTY    -       Inform FAT32.IFS to set its internal dirty flag, and mark the drive
                  dirty on disk. On shutdown the drive will be left dirty, so when
                  booting Windows 95(OSR2) and later Windows versions, SCANDISK will
                  be started.

IMPORTANT:  Starting with version 0.97, CHKDSK /F must first be run on each FAT32
partition before adding EA support to the FAT32 IFS driver. This step is required
starting with this version

You can use F32STAT.EXE to run CHKDSK automatically on next boot by doing the following.

F32STAT.EXE x: /DIRTY

Where, x: is your FAT32 drive which has files with EA.

F32STAT.EXE supports only one drive at one time. So if you want to change the state
of one more drive, you should run F32STAT.EXE, respectively. i.e., FAT32 drive is C: D:.
You should run F32STAT.EXE two times for C and D as the following.

F32STAT.EXE C: /DIRTY
F32STAT.EXE D: /DIRTY


F32MOUNT.EXE   
------------

F32MOUNT.EXE allows to mount the file system images, e.g., diskette images and 
hard disk images, or partitions inside hard disk images. Also, we have ported a
library from QEMU, allowing to access data inside virtual machine's hard disk 
images, including VirtualPC (.VHD), VMWare (.VMDK), VirtualBox (.VDI), QEMU (QCOW 
and QCOW2), Macintosh DMG, Bochs, Linux CLOOP (images used by Knoppix LiveCD), 
Parallels, VVFAT, and plain RAW images.   

The images can be mounted at the directory, serving as a mount point. The 
directory should be on a FAT12/FAT16/FAT32/exFAT drive, and the mounted filesystem 
should be FAT12/FAT16/FAt32/exFAT too. So, you can access the image filesystem 
by changing the directory to the selected mount point subdirectory.   

Also, with LOOP.ADD, there is a possibility to mount images with any file system 
(besides FAT12/FAT16/FAT32/exFAT) on a drive letter.

The IFS uses CACHEF32.EXE as a helper. It loads the QEMUIMG.DLL library, which 
contains functions to read data inside the virtual VM disk images of the above 
mentioned formats.   

The syntax is the following:   

[c:\] f32mount [/a | /u] [d:\somedir\somefile.img [<somedir> | /block] [/d] [/p:<partition no>][/o:<offset>][/f:<format>][/s:<sector size>]]   

So, for the mount command, the first parameter is an image path (absolute or relative), the second 
is the mount point (absolute or relative, too), or a "/block" parameter, which specifies that we should
mount to a block device with LOOP.ADD. In the latter case, the image will be mounted to a drive
letter, and F32MOUNT.EXE refreshes removable media, and the image gets mounted to a drive letter,
with any available IFS (not only FAT32.IFS).

:p.Then the following options are possible&colon.

/d - specifies that we're unmouning the image, or a mountpoint, specified as a first parameter.   

/p:<partition no>   - specifies partition number to mount. Numbers 1..4 specify primary 
                      partitions; nubmers > 4 specify logical partitions. E.g., 5 is the 
                      first logical partition, 6 is second logical partition, etc.   

/o:<offset>         - specifies the offset of partition table from the start of the image. 
                      This should be specified if you have a RAW image having a special 
                      header right before the partition table. This option can be used 
                      in conjunction with the /p option. The offset could be either 
                      decimal, or hexadecimal. Hexadecimal offsets start with "0x".   

/f:<format>         - force the use of specified format, instead of autodetecting it, which 
                      is the default. Usually, the format is autodetected by the QEMUIMG.DLL 
                      library. The following format names are defined: 
                      Raw/bochs/cloop/dmg/vpc/vmdk/parallels/vvfat/qcow/qcow2/vdi.   

/s:<sector size>    - force sector size value. Note that currently, OS2DASD.DMD does not 
                      support sector size values other than 512 bytes, and attempt to 
                      specify the value of, for example, 4096 bytes will cause a trap 
                      in OS2DASD.DMD.

Examples:   

[c:\] f32mount win32.dsk w:\tmp\0   

- mounts a diskette image.   

[c:\] f32mount flash-512mb.img w:\tmp\0 /p:1   

- mounts the first primary partition on a 512 MB flash disk image.   

[c:\] f32mount win98.vhd w:\tmp\0 /p:5   

- mounts the first logical partition on the VirtualPC image with Win 98 installed.   

[c:\] f32mount hdimage.freedos w:\tmp\0 /p:1 /o:0x80 /f:raw   

- mounts the first primary partition on a DOSEMU FreeDOS image (having a 0x80-byte 
header before the partition table.). Force format to RAW.

The images are unmounted with the following command:

[c:\] f32mount hdimage.freedos /d

or

[c:\] f32mount w:\tmp\0 /d

or, in case the image was mounted to the block device,

[c:\] eject j:

where j: is a block device drive letter.

[c:\] f32mount /a

automatically mount all images specified in d:\os2\boot\fstab.cfg

[c:\] f32mount /u

automatically unmount all images specified in d:\os2\boot\fstab.cfg

d:\os2\boot\fstab.cfg file specifies what images should be automounted/autounmounted,
and with which options. Each line should be the same as f32mount.exe file command line looks like,
except for the first "f32mount" word, which is omitted. For example, the following line:

l:\data\vm\img\z.iso /block

will automount l:\data\vm\img\z.iso file at the drive letter. The line:

l:\data\vm\img\winxp.vhd w:\tmp\0 /p:1

will automount the l:\data\vm\img\winxp.vhd file at the w:\tmp\0
mount point on the FAT drive w:, 1st primary partition will be mounted.

Also, except for "mount" lines, comment lines are possible, which sholud start with "#"
or ";" symbols. These lines are ignored.


==============================
CURRENT STATUS AND FEATURES:
==============================

LIMITATIONS:
------------

Logically, FAT32 should now support up to 2 terabytes partitions in size.
However, we cannot be sure that MS does not use another combination of sectors
per cluster and bytes per sector. If this is the case, the supported size could
be smaller. A FAT32 partition can contain files up to 4GB in size. The 4GB is
the limit of FAT32 file system itself. Files less than 2GB can be copied or
moved to a FAT32 partition. Files larger than 2GB cannot be read by some
programs such as xcopy. It appears that xcopy itself does not support files
greater than 2GB. Note by Valery Sedletski:. I tested FAT32.IFS on hard disks with 
sizes up to 1 TB -- I have a 1 TB USB hard disk formatted as FAT32, and it works fine.
Also, flash sticks can have unlimited size -- 2 GB is a limit for SD cards, 32 GB is the 
limit for SDHC cards, and 2 TB is the limit for SDXC cards. SDXC cards are formatted
as exFAT on the factory, but can be optionally reformatted to FAT32, if preferred.
I have a 128 GB microSDXC card, which I reformatted as FAT32, it works fine with 
FAT32.IFS. Note that FAT32.IFS supports exFAT too. 2 GB file size is the limit of some 
softrware, not supporting 64-bit file size. So, such software, including most 
16-bit IFS-es, support 32-bit signed file size, 2^31 == 2 GB. But currently,
we added support for 64-bit file size (aka "large file support") into FAT32.IFS.
Large file support is enabled on FAT32.IFS, if "/largefile" is specified in 
FAT32.IFS command line. FAT family filesystems (FAT12/FAT16/FAT32), however, 
have a 32-bit field for file size in each directory entry, which limits file size 
to 4 GB == 2^32 bytes. A cluster chain in the FAT table, however, can be
unlimited. This allows for files with unlimited size, if we'll store full
64-bit file size elsewhere, but not in the directory entry. FAT+ extension
stores bits 32-34 in unused 0-2 bits of "EA mark byte". This allows for file
sizes up to 32 GB. If the file size is even bigger, the full 64-bit file size
can be stored in special FAT_PLUS_FSZ EA. EA's should be enabled with
"/eas" switch, of course. Also, for FAT+ support to be enabled, you'll need to
add the "/plus" switch to FAT32.IFS command line. Note that
file size is 64-bit in exFAT, so extensions like FAT+ are not required
here.

Starting from FAT32.IFS v. 0.10, now clusters of sizes up to 64 KB
are supported on FAT12/FAT16/FAT32. However, MS discourages the use of
64 KB clusters, because such clusters may crash older MS OS-es like Win95
or MSDOS, causing division by zero. But if you don't have such OS-es
on your machine, such filesystems with 64 KB clusters may be useful, for
example, you can use a 4 GB FAT16 partition as a SADUMP partition.
Clusters of sizes up to 32 MB are supported on exFAT partitions.

FAT32.IFS previously supported only disks with a sector size of 
512 bytes. However, this has been changed in FAT32.IFS ver. 0.10. 
CD/DVD/BD have 2048-byte sectors; MO drives have 1024-byte sectors. 
Also, some modern hard disks support 4096-byte sectors, though, 
these big sectors are seen by disk firmware, only. Every OS still 
sees 512-byte "virtual" sectors. Also, I heard of some unusual USB 
hard disks with 4096-byte sectors, visible to an OS. Such hard 
drives are, of course, currently unsupported by OS/2, but this 
can change in the future. FAT32.IFS supports non-512-byte sectors&per. 
Sector size is detected according to BIOS parameter block.But such 
non-512-byte sectors are supported on CD/DVD/BD and MO drives, only. 
Hard disks are limited to 512-byte sectors on OS/2.). Yes, FAT32.IFS 
supports not only hard disks, but other media like MO drives (they are not 
tested, though), floppies or CD/DVD/BD disks. See "Using CDRW's with 
FAT16/FAT32/exFAT filesystem" section for more info.

You cannot BOOT OS/2 yet from a FAT32 partition as it done for HPFS/JFS. 
This can change some day, though. Currently, SYSINSTX installs the FreeLDR 
bootblock, so you can boot it from that partition. Later, a conventional 
miniFSD support will be added, so you'll be able to boot OS/2 the same way
as HPFS/JFS. Note also that booting OS/2 from FAT (FAT12/FAT16/FAT32/exFAT) 
is possible with FreeLDR and its OS/2 booter, bootos2.mdl (used in Team Boot/2 
boot disk -- universal OS/2 rescue/live system, supporting CD/flash/harddisk/etc 
media).

You cannot place the SWAPPER.DAT on a FAT32 partition yet. However,
there is some incomplete swapping support written, and some day it will support
swapping on FAT (FAT12/FAT16/FAT32/exFAT) partitions.

CHKDSK can diagnose a disk, but will only FIX lost clusters and an incorrect
free space count. For all other errors, you'll need to run Windows and start
SCANDISK to fix the problem.

CHKDSK will always convert lost clusters to files and NEVER to directories. If
you want that, use WinNT CHKDSK. Note by Valery Sedletski: In FAT32.IFS v. 0.10, 
CHKDSK saves lost chains into new subdirectory on each CHKDSK run. So, this 
limitation also has been overcome.

The RECOVER command is not yet supported. FORMAT and SYSINSTX are supported
in FAT32.IFS v. 0.10, since some revision. SYSINSTX, however,
still does not support os2boot (a miniFSD). Currently, SYSINSTX only writes
a bootblock of FreeLDR (a bootloader developed by the osFree project).

Only last access date (and not last access time) is maintained by FAT32.IFS.
This is similar to Win95 (OSR2).

Long filenames are not by default supported in DOS and Win-OS/2 sessions, they
use only the shortnames. Please see 'LONG FILENAMES IN OS/2 AND DOS SESSIONS'.

You'd better NOT change codepages on the fly IF you have open files with
filenames that contain extended ASCII characters.

If you are using PARTFILT.FLT then FDISK, Partition Magic or any partition
maintenance tools will show non-existing drives and other nonsense.

This version needs the native NLS support from OS/2. This means Warp 3 fixpack
26 or higher or Warp 4. (You must have the LANGUAGE directory)



REMOVABLE MEDIA:
-----------------

Presently, the FAT32 driver should have no problems recognizing USB
harddisks or disks encapsulated in an USB enclosure, as long as it is
supported by the USB driver.

According to Microsoft's FAT32 specs, FAT32 volumes can be legally generated
only for media over 512 MB, which is beyond the size of most (if not all) of
the current Flash media, such as those found in digital cameras. These volumes
are usually formatted as FAT and thus are NOT accesed throughthe FAT32 driver.

Windows XP does, however, allow one to format removable media less than 512 MB FAT32.

Note: The above paragraph is obsolete these days. The days when flash disk sizes were 
about 512 MB have gone many years ago. Now flash disks are some tens of GB in size. So, 
for current media sizes, FAT32 is optimal file system. Or, exFAT could be used too, for 
carrying large files, bigger than 4 GB. But since FAT32.IFS now supports VFAT on FAT12/FAT16 
volumes, the old FAT16 flash disks with sizes like 512 MB can be used with FAT32.IFS too. 
This is tested successfully too. For example, I have two flash sticks, one is 512 MB, the 
second is 2 GB. Both working like a charm.   

Also, there were FAT16-only old mp3 players, like I had in the beginning of 2000's. It's 
size was 256 MB and it was formatted with FAT16. It looks that FAT32 is unsupported by the 
firmware. These days, I copied files via WPS with creating the .LONGNAME EA's, then used 
vfat2ea utility to convert .LONGNAME EA's to VFAT LFN's. Now this technique is obsolete. 
FAT16 with VFAT LFN's can be directly supported by FAT32.IFS.   

FAT32.IFS should work with any fixed or removable media of any size. So far, it is tested 
by me with disks up to 1 TB in size. I have a 1 TB USB 2.5" removable hard disk formatted 
with FAT32, for backup and exchange purposes. Everything works fine. Also, nothing prevents 
to use disks up to 2 TB (with MBR partition scheme. With exFAT, or GPT partition scheme, 
it could be even larger.).

In either case, for LVM systems one would also need to assign a volume letter
to the drive before accesing the files on it.

Note:  If the FAT32 driver is installed, the file system will load whether one has a FAT32
partition or not. Thus, if a removable FAT32 drive is plugged in or inserted, the FAT32
media should be found, provided the removabe drive(s) are supported by the USB drivers or
whatever other drivers are necessary for the drive(s) to be found and recognized.

Some formatted FAT32 USB flash media work with the driver while others don't.

IMPORTANT: Be sure and install the latest USB drivers from either the eComStation web site 
or IBM's Software Choice. If you are still unable to access your Removable media, download 
Chris Wohlgemuth's USB driver package and replace the IBM mass storage device with Chris's 
driver. Be sure and read the documentation on using his driver(s).   

Addition: Nowadays, the above sources of drivers are obsolete. Chris Wohlgemuth's USB drivers 
are obsolete too. Please use Lars' Erdmann's USB drivers from Hobbes (search them by "usbdrv" 
keyword).

TYPES OF USB MASS STORAGE DEVICES
---------------------------------

There are two kinds of USB removable media: partitionable media and large Floppy media.
Many modern USB devices work as both and can be switched from one mode to another.
This can be done either in some device-specific way (such as a hardware switch, software
utilities or a combination of both) or in most compatible devices by erasing or creating
partition tables on the device with an advanced disk tool (such as DFSee) which bypasses
system detection of the device as a fixed type, and then detaching and re-attaching the
device so changes are recognized.

Partitionable USB drives are seen by the system as if they were "normal" hard disks, so
to get them to work with OS/2, you have the usual limitations: 

-OS2DASD.DMD must be at a certain level for large drives to be fully recognized. 
-Also, volumes must be created (and have sticky drive letters assigned if they are to 
be accessed) either from existing partitions, or from unassigned space areas within 
the "disk". 
-Partitions on these devices should also have their proper types set (i.e. 0B/0C for 
FAT32, 07 for HPFS/NTFS/exFAT, 06 for FAT16, etc.) in order to avoid problems.

With recent versions of Lars' Erdmann's USB drivers, Large floppies with FAT/FAT32/exFAT 
filesystem can be emulated on USBMSD driver level. The driver just emulates the 1st track 
with MBR and partition table, and DLAT sector with LVM info. This allows to see Large 
Floppy media created by Windows, with FAT32.IFS.


GETTING THE FAT32 DRIVER TO WORK WITH REMOVABE MEDIA
------------------------------------------------------

 1.Your motherboard bios must support USB devices.  Make sure USB support is enabled in
the motherboard bios.

 2.The USB drivers by IBM work best with the most recent os2krnl, os2ldr, and ibmdasd
drivers. Install them next if you have not already done so.

 3.Always update to IBM's latest USB drivers. Reboot and test USB devices. If they work,
you need go no further. If not, proceed to to next step.

 4.Check to make sure that you have lines similar to those listed below in your config.sys.
I like using the /V option because it tells one whether the necessary drivers are loaded
or not at bootup.  The /V option can always be removed later when your USB device are
working properly.

REM BASEDEV=USBUHCD.SYS /V
BASEDEV=USBOHCD.SYS /V
BASEDEV=USBOHCD.SYS /V
BASEDEV=USBEHCD.SYS /V
BASEDEV=USBD.SYS
BASEDEV=USBHID.SYS
BASEDEV=USBMSD.ADD /FLOPPIES:0 /REMOVABLES:2 /V
rem BASEDEV=USBCDROM.ADD

Keep a copy of the file "hcimonit.exe" in a directory found in your config.sys Path statement.
This file normally comes with the IBM's USB drivers. This program will list the type of host
controllers found on your system.  At a command prompt, type "hcimonit.exe".

In the example below, this computer has 2 USB OHCI host controllers and 1 USB EHCI host
controller.  Thus, the following three lines would need to be found and if, not added
to the config.sys file.

BASEDEV=USBOHCD.SYS /V
BASEDEV=USBOHCD.SYS /V
BASEDEV=USBEHCD.SYS /V

 5.Create a compatibility volume using LVM if you have not already done so. Check to see if
your drive is recognized by LVM. Removable drives usually have an * instead of a drive letter.
I suggest that you assign a permanent drive letter. I have found that some USB media won't be
recognized unless they are assigned a drive letter. If your media still is not recognized, go
to next step.

 6.If the drive worked in the past, try running "chkdsk <drive>: /F".  Continue on if your
drive still doesn't work.

 7.Check to see if you have the following statement in your config.sys file.

BASEDEV=OS2PCARD.DMD

If it does exist, try remming it out and rebooting. Try your USB devices again. If your USB
devices are found and functioning properly, you need go no further.

Note:  It has been reported that the Card bus 8 driver does not conflict with the USB drivers.
However, other problems are introduced. eCS 1.2 comes with the Card bus 5 driver. Thus, if you
are using eCS 1.2, you will either need to rem out the driver or install the Card bus 8 driver.
If you still don't have your device(s) working, read further.

 8.Some USB flash media comes with security software. With this software on the media, the drive(s)
cannot be read by the IBM drivers {LVM included). To overcome this, try the following:

 a.Get to a Windows machine and reformat the drive.

 b.Then boot to DFSee (in my opinion, this is a must utility for every OS/2 user).
If you don't have it, download the latest version. It can be used in demo mode.

 c.Using DFSee, create a new Master Boot Record with the tables erased.

DFSOS2.EXE > Mode=fdisk > New MBR code, ERASE tables > Select the correct drive > OK

Note:   You possibly could skip step A and start with B. I have not tried it.

 9.Use LVM to create a new partition. LVM (Logical Volume Manager) in this instance refers to
either the command line LVM or the WPS LVMGUI.  Using the command line LVM, the partition must
be created while in "Physical View".  Using the LVMGUI, the partition can be created from either
"Logical or Physical views".

10.Make the drive Primary.

11.Using LVM, make the media a compatibility volume. Using the command line LVM, the capibility
volume must be created in "Logical View". LVMGUI can create the volume from either "Physical or
Logical" views.

LVMGUI > Volume > Create Volume > Create non-bootable volume > Create Compatibility Volume

12.Format the drive.

The media can be formatted FAT, HPFS, FAT32, or JFS. Formatting FAT32 can be done numerous ways.
Presently, the only way to format a volume FAT32 under either eComStation or OS/2 is to use DFSee
and F32blank together. The procedure is as follows:

 a.Find out the volume relevant data: Heads, Sectors, Starting point and Size using DFSee
 b.Feed F32Blank with that data to generate a file with blank FATs suitable for the volume
 c.Detach the volume (with LVM it's called 'hide' or similar)
 d.Use DFSee to overwrite the volume with the file contents, using "wrim".
 e.Attach again the volume.
 f.If after this you can't read/write properly the volume or it appears as not empty, then
   you MUST reboot and check it again.
 g.If you don't like DFSee go and find something else capable of doing the job.

If this is too complicated for some people, the USB media can be formatted using one of the
Window's versions. Each Windows version has it own built in limitations.

Win95R2 <= 16 GB
Windows 98 second addition - Volumes < 128 GB and > 512 MB
Windows ME - 512 GB to 2 TB.
Windows XP <= 32 GB.

Other formatting alternatives

FreeDOS <= 16 GB
Partition Commander versions 8 and 9 (Limitations unknown)

Note:  After formatting, always run chkdsk under OS/2 if using the OS/2 FAT32 driver. This
is probably true for any filesystem used.

If you still cannot get your drive to work, you can try the next steps.

13.Download Chris Wohlgemuth's USB driver package (cw-usbmsd-v1_2b.zip) and install his
USB mass storage driver (CWUSBMSD.ADD), replacing the IBM driver. Copy his CWUSBMSD.ADD
driver to the OS2\BOOT directory. Rem out IBM's USBMSD.ADD driver. Add a line similar to
the following to your config.sys file. Be sure and read his documentation.

Example:

REM BASEDEV=USBUHCD.SYS
BASEDEV=USBEHCD.SYS /V
BASEDEV=USBOHCD.SYS /V
BASEDEV=USBOHCD.SYS /V
BASEDEV=USBD.SYS
BASEDEV=USBHID.SYS
REM BASEDEV=USBMSD.ADD /REMOVABLES:3
BASEDEV=CWUSBMSD.ADD /FLOPPIES:0 /REMOVABLES:4 /FIXED_DISKS:2 /FORCE_TO_REMOVABLE

Adjust the REMOVABLES options to the max number of removables you my have plugged in
at one time. Be aware that LVM will still list drives whether you have them plugged
in or not. These drives will show up as 96 MB volumes.

14.Reboot and see if your device(s) are now recognized. If not try the next step.

15.Download M. Kiewitz's driver package, MMPORTv1.zip, from Hobbes. You will need
to replace IBM's USBD.SYS driver with Martin's USBD.SYS driver. Attempting to use
this driver has risks. To be safe, rename the IBM driver to something like
USBD_BCKUP.SYS. That way if something goes wrong, you can either boot to a
command prompt or a maintenance partition to copy the IBM driver back over
Martin's driver. Martin's driver can trap on boot up. What Martin's driver
does different is that it attempts to find USB media the Microsoft way instead
of the USB Standards way. When it works, it can be a life saver. If it doesn't
work with the latest IBM drivers, you might try downloading some of the earlier
versions of the USB drivers from the eComStation ftp site. The closer the IBM
drivers are to the date of his released driver, the greater the chance of his
driver working. Since he does not have access to the latest code, he had to use
the last available code from the DDK site. If you have a usbcalls.dll on
your eComStation system, replace it with Martin's fixed usbcalls.dll. The driver
has been patched to fix a nasty bug.

Hopefully one of the above techniques will solve your problem.

IMPORTANT:  If plugging the drive into different computers, make sure ALL the USB
drivers are the same on these systems. File corruption can result when using
different drivers and versions.

Always "EJECT" media before removing (unplugging).  To do otherwise can cause
file corruption requiring "chkdsk" to be run. If the corruption is too bad,
Window's "scandisk" will have to be run on the drive.  Be aware that Windows XP
FAT32 scandisk is broken.  It fails to fix problems that earlier versions of
Windows 98 and ME were able to fix.  It will no longer fix mismatched FAT chains.


See also TROUBLE SHOOTING


COMPATIBILITY WITH WINDOWS:
----------------------------

As far as the original author, Henk Kelder, could tell, FAT32.IFS is fully
compatible with the FAT32 support in Windows. VFAT longnames could be used on
his PC. Windows did not complain (anymore!) about long filenames created with
FAT32.IFS. The numeric tailed short names also seemed to work ok. (The numeric
tail option cannot be switched off!)

File names are, as in Windows, case preserving (in OS/2 sessions). Creating a
name in lower case will result in the file having a VFAT longname, even if the
name conforms to 8.3. The case will be preserved.

Last access dates are maintained by FAT32.IFS. (but not the last access time
since Win95 doesn't support it) You can see these when using the detailed view
of the drive object.

The possibility exists that files created by any system of the WinNT family such
as Win2X and WinX can be recognized as having Extended Attributes by the FAT32
driver.

Although this should be fixed in the latest Netlabs version, the possibility
still remains that the FAT32 driver recognizes a file having a non-zero in its
EA field as an EA file, even though such a file is not an EA file. Why? Only a
file having 0x40 or 0x80 in its EA field should be recognized as an EA file. One
cannot be sure that files created by any of the WinNT family do not have 0x40 or
0x80 in their EA fields. Fortunately, this is a remote possible.  If such a file
is found, CHKDSK will complain about this.

See "The Mark Byte"


WINDOWS OS/2 CHARACTER SET:
----------------------------

OS/2 uses standard character sets. Such a character set is called a CODEPAGE.

By default Windows long file names (VFAT) are stored in UNICODE.

Since Warp 3 (fixpack 26?) OS/2 contains NLS support. CACHEF32..EXE

Keep in mind that a table for only ONE codepage is loaded. Should you change
codepages (using CHCP) you must rerun CACHEF32 to load a new table, but keep in
mind OS/2 keeps different codepages per session so if you use CHCP to change the
CP that CP is only only valid for that session.


OS/2 AND DOS SESSIONS:
----------------------

In the initial release, long file names were only shown in OS/2 sessions, but in
DOS sessions, the short filename equivalent was shown.

However, this could lead to big problems.

Example:
In an OS/2 session, directory \DevStudio was current, from a DOS session the
directory \DEVSTU~1 could be removed since OS/2 did not know that DevStudio and
DEVSTU~1 were in fact the same directories.

The same problem could occur when opening files in both OS/2 and DOS. No proper
multiuser handle would take place since OS/2 doesn't know that files with
different names are the same.

To solve this problem I've done the following:

Via a setting, FAT32.IFS can be told to:
Translate all long filenames internally to their short equivalences OR
Use the long names internally, but hide all files or directories with long names
from DOS sessions. This setting can be changed (on the fly) with CACHEF32.EXE.

When using short names internally the following drawbacks occur:
Current directory is shown as a short name (command line only)
When deleting (long) files from the command line, the WPS doesn't pickup the
deletions.

When using long names internally the following drawbacks occur:
Files and directories with long names are not visible in DOS sessions. However,
this is the same as with HPFS.


LFN TRANSFERS ACROSS A LAN:
---------------------------

The FAT32 driver has nothing, at all, to do with the Windows machine serving up
short file names to an OS/2 machine, across a LAN. That problem is still there,
and it is caused by the Windows LAN support.

In short: if the file operations are performed by a Windows machine on an OS/2
machine, everything will go fine. Operations made by an OS/2 PC against Windows
remote machines are likely to suffer problems with long file names. To be more
precise:

If you have Windows NT, Windows 2000, Windows XP or newer, your long file names
(LFNs) are fully interoperable between OS/2 and a Windows system over a
network.

If your Windows system is older than that (Windows 95, 98, and ME), you can work
flawlessly with LFNs on a remote OS/2 machine from the Windows PC; however,
it doesn't work the other way round. I.e. the Windows remote machine will show
LFNs to its other Windows pals in the network, but your OS/2 machine will be
served just short filenames instead.

Why?

This is because of how each PC on the LAN identifies itself and its capabilities
to the other PCs in the network. OS/2 says to the other machines it uses LM10
for compatibility's sake, which makes win9x machines treat this one like it were
DOS+W3.11 (i.e. no LFNs). According to IBM, it can do LM30 perfectly - but do
NOT try to patch the binaries or you'll get a trap.  Oh well, this is just plain
IBM's fault.

OK, OS/2 says it's LM10 and we can't blame Microsoft for that. However, other
LAN OS/2 pals have no difficulties whatsoever identifying the OS/2 behind
this 'LM10' label and allowing LFN operation without trouble.

As of 2003 Q2 there hasn't been a release of this patch for win9x networking (as
a patch for the main OS network subsystem, perhaps it is in the form of some BM
windows client for OS/2 peer or something, i.e. not from M$ themselves).


EXTENDED ATTRIBUTES:
--------------------

Since version 0.70, FAT32.IFS supports EXTENDED ATTRIBUTES.

For FAT32.IFS to support Extended Attributes /EAS MUST be specified after the
IFS=....\FAT32.IFS line in the config.sys.

Extended Attributes are implemented in the following manner:

For each file or directory that has extended attributes, a file is created with
a name that consists of the file or directory name the EAs belongs to followed
by ' EA. SF'.  So if a file called 'FILE' has extended attributes, these
attributes are stored in a file called 'FILE EA. SF'.

These EA files are given the hidden, read-only and system attributes.

FAT32.IFS will not show these files in a directory listing, but Win9x and later
can show them.

IMPORTANT:  Starting with version 0.97, CHKDSK /F must first be run on each FAT32
partition before adding EA support to the FAT32 IFS driver. This step is required
starting with this version due to the EA mark byte being changed for compatibility
with WinNT family.

You can use F32STAT.EXE to run CHKDSK automatically on next boot by doing the following.

F32STAT.EXE x: /DIRTY

Where, x: is your FAT32 drive which has files with EA.

F32STAT.EXE supports only one drive at one time. So if you want to change the state
of one more drive, you should run F32STAT.EXE, respectively. i.e., FAT32 drive is C: D:.
You should run F32STAT.EXE two times for C and D as the following.

F32STAT.EXE C: /DIRTY
F32STAT.EXE D: /DIRTY


THE MARK BYTE:
---------------

To speed things up a bit, each file having extended attributes is marked by
FAT32.IFS. For this mark, an apparent unused byte in the directory entry is
used. The value for this byte is set to 0x40 for files having normal EAs, to
0x80 for files having critical EAs, and to 0x00 for files not having EAs at all.

(Please note that files with critical EAs can not be opened by programs not able
to handle EAs, like DOS programs.)

This byte (directly following the files attribute) is not modified while running
Windows and by neither SCANDISK or DEFRAG, but theoretically, other programs
running under Windows could modify it.

If another program sets the value to 0x00 for a file that has EAs these EAs will
no longer be found using DosFindFirst/Next calls only. The other OS2 calls for
retrieving EAs (DosQueryPathInfo, DosQueryFileInfo and DosEnumAttribute) do not
rely on this byte.

Also, the opposite could, again, theoretically occur. Files not having EAs could
be marked as having EAS. In this situation only the performance of directory
scans will be decreased.

However, both situations are checked and if necessary corrected by CHKDSK.


THE DRAWBACKS:
---------------

Currently, the drawback of using Extended Attributes is that directory scan
performance has slightly decreased.

The overhead on opening or accessing individual files is hardly noticeable.

If you do not really need extended attribute support then simply do not specify
/EAS after the IFS line in the config.sys.


THE ADVANTAGES:
----------------

The advantages of FAT32.IFS supporting extended attributes are:
The WPS heavily uses EAS to store folder and file settings. Without EAS, the WPS
will not remember settings across boots.
REXX .CMD files must be tokenized on each run, thereby reducing performance.
With EAS the tokenized version of the .CMD will be stored in EAs.

If you can live with the small loss in performance while doing directory scans,
it is advised you specify /EAS after the IFS line in the CONFIG.SYS.

If you do not really need extended attribute support, and you cannot accept the
decrease in directory scan performance, then simply do not specify /EAS after
the IFS line in the config.sys.


=================
DRIVER INTERFACE:
=================

IOCTL SUPPORT:
--------------

IOCTL calls (category 8) are now passed through to OS2DASD.  All calls supported
by OS2DASD.DMD are now also supported by the IFS.


SUPPORTED FUNCTIONS:
--------------------

FS_ALLOCATEPAGESPACE:             No

FS_ATTACH:                        No

FS_CANCELLOCKREQUEST:             No, function is implemented in the KERNEL

FS_CHDIR:                         Yes

FS_CHGFILEPTR:                    Yes

FS_CLOSE:                         Yes

FS_COMMIT:                        Yes

FS_COPY:                          Partly, unsupported actions are simulated by command
                                  shell

FS_DELETE:                        Yes

FS_DOPAGEIO:                      No

FS_EXIT:                          Yes

FS_FILEATTRIBUTE:                 Yes

FS_FILEINFO:                      Yes

FS_FILEIO:                        No

FS_FILELOCKS:                     No, function is implemented in the KERNEL

FS_FINDCLOSE:                     Yes

FS_FINDFIRST:                     Yes

FS_FINDFROMNAME:                  Yes

FS_FINDNEXT:                      Yes

FS_FINDNOTIFYCLOSE:               Obsolete in OS/2 WARP

FS_FINDNOTIFYFIRST:               Obsolete in OS/2 WARP

FS_FINDNOTIFYNEXT:                Obsolete in OS/2 WARP

FS_FLUSHBUF:                      Yes

FS_FSCTL:                         Yes

FS_FSINFO:                        Yes

FS_INIT:                          Yes

FS_IOCTL:                         Yes - LOCK ^ UNLOCK, others are passed to OS2DASD.

FS_MKDIR :                        Yes

FS_MOUNT:                         Yes

FS_MOVE:                          Yes

FS_NEWSIZE:                       Yes

FS_NMPIPE:                        No

FS_OPENCREATE:                    Yes

FS_OPENPAGEFILE:                  No

FS_PATHINFO:                      Yes

FS_PROCESSNAME:                   Yes

FS_READ:                          Yes

FS_RMDIR:                         Yes

FS_SETSWAP:                       No

FS_SHUTDOWN:                      Yes

FS_VERIFYUNCNAME:                 No

FS_WRITE:                         Yes


PERFORMANCE:
-------------

All of the code is in plain 16 bits C (All of OS/2's IFS's are 16 bits!). No
assembly language code is used.

The F32MON function takes a lot of time. Be sure to switch if off if you don't
need it.

You should probably experiment with the CACHEF32 options to get the best
performance for your situation.

The default for the LAZY WRITER is idle-time priority (/P:1). You might like to
experiment with the /P option as well, especially if you have performance
problems with FAT32.IFS.

For best performance it is advised to keep the disk as defragmented as possible.
Use Windows 9x or later versions defrag to defrag the disk.

===
FAQ
===

Q:       Why did you not created three different IFS drivers for FAT, FAT32, EXFAT? 
A:       Because all FAT flavours are very similar. Many code used by each of them is common. 
The differencies are minor. FAT drives differ from FAT32 ones only in that: 1) BIOS parameter 
block is different, 2) Root directory is located in reserved area, so it is not assigned cluster 
numbers. We were needed to handle FAT root directory specially, while in FAT32 it starts in 
common cluster heap area, usually, with cluster no. 2. 3) FAT entries in FAT12 are 12-bit 
(so, two FAT entries compose three bytes). In FAT32 they are all 32-bit. Otherwise, all three 
FAT flavours are the same. VFAT long filenames are the same in FAT12/16/32. Only EXFAT has 
different LFN format. Many code is common. So, creating three or four almost identical drivers 
is a waste of machine resources and unneeded duplication. EXFAT is more different that the first 
three FS'es. It has different boot sector structure, different FAT bitness (it is 32-bit, like 
FAT32 is, but it uses all 32 bits of each FAT entry. FAT32 uses only first 28 bits of a FAT entry. 
The 4 most significant bits are zeroes.). Also, it introduces a bitmap for tracking a free space, 
which is used for that, instead of a FAT table. FAT table is not used at all if a file is marked 
as non-fragmented. So, no need to follow a FAT chain if a file is non-fragmented. You just need 
to know a starting cluster, and a file length, to correctly read such a file. And finally, EXFAT 
uses different directory entry format, than the first three FAT flavours. But still, the amount 
of modifications is not too big: fat32.ifs without EXFAT support is just less than 20 KBytes 
smaller than a full-featured version. Also note that for the same reasons, FAT32.IFS uses a common 
UUNIFAT.DLL utility DLL with four forwarders: UFAT12.DLL, UFAT16.DLL, UFAT32.DLL, UEXFAT.DLL.   

Q:      Why FAT32.IFS always shows a file system name being FAT32? Why not show the actual file system type? 
A:      What is shown in file managers' info panels is a value returned by a DosQueryFSAttach API. It is taken 
by the kernel from an IFS' FS_NAME exported variable. (Please read about it in IFS.INF file). This value 
is 8 bytes long and should not change since IFS is initialized. So, we are unable to change it to the 
"actual" file system name. It is a string used for IFS identification. If an IFS supports more than one 
filesystem, this variable should be the same. Examples of such IFS'es are Netdrive and vfat-os2.ifs. 
Netdrive always show "Netdrive" as its identification. Vfat-os2.ifs used the "vfat" word for that purpose. 
Except for VFAT drives, it also supported limited read only NTFS access. But the IFS identification still was 
"vfat". The same is done by FAT32.IFS. There were suggestions to divide it to three different IFS drivers, 
for FAT, FAT32 and EXFAT. But this is not feasible for the reasons, mentioned in previous question/answer.   

Q:      How do I determine the actual file system type of my media? 
A:      The only means to determine the actual file system type is to run CHKDSK (probably, without the /f 
parameter). Then you can see the actual FS type is its report, at the beginning (please, look at CHKDSK article). 
After a report header appears, you can press "Ctrl-C" to interrupt CHKDSK.   

Q:       Why did you supported EXFAT? It is proprietary Microsoft technology and they extort money from anybody 
using this technology in his products. Do you fear Microsoft? 
A:       Yes, we are beware the money extortion (called a license fees) from Micro$oft side. Nobody is insured 
from that. But, for free software, which is FAT32.IFS, it should be no problem. Free versions of Linux, like 
Debian is, are safely distributing a (FUSE) version of their EXFAT driver. Commercial Linux vendors, Like SuSe 
and Redhat, are paying MS license fees, it seems (or don't distribute an EXFAT driver with their OS'es). Arca 
Noae, being a commercial OS/2 vendor, wants to be as far as possible from patented MS stuff. But we made, by 
their request, a version of FAT32.IFS without an EXFAT support. We hope it will be sufficient to them to avoid 
MS claims. Anyway, MS caused the IT industry to use their patented proprietary EXFAT on SDXC cards (all SD cards 
larger than 32 GB). So, if we'll not have support for it in our OS, we would not use any newer devices with OS/2, 
like cameras, video registrators, smartphones etc. With FAT32 only, we should stick with files not exceeding 4 
GB (fat32.ifs now supports up to 4 GB. Previously, it supported only 2 GB files, because it is a 16-bit driver. 
Now with EXFAT support, more than 4 GB is supported, so it should be not a problem). Without support for files > 4GB, 
the video recording in newer cameras would be limited with about 30 mins of video. This is if you use high quality 
recording. Additionally, some devices are not guaranteed to support FAT32 on SDXC. They could support EXFAT only, 
and this could be a big problem without EXFAT support. So, EXFAT support is important, indeed, despite the fact 
that it is patented and proprietary.   

Q:      Why cannot I seek beyond a 2 GB limit on large files? 
A:      Because support for 64-bit seek seems to be incomplete for 16-bit IFS drivers. The sequential file access 
works (I can copy big files to/from a FAT32/exFAT drive, but I cannot enter big .zip files, for example). For that, 
there is a FS_CHGFILEPTRL export in FAT32.IFS, but it does not get called by a kernel. The kernel calls the standard 
FS_CHGFILEPTR entry point, which is limited to max. 2 GB file position. The file position gets truncated. The 32-bit 
FS32_CHGFILEPTRL function with 32-bit IFS'es, though, works. This seems to be an unfinished feature. So, I see two 
solutions here: 1) convert FAT32.IFS to a 32-bit driver, or, at least, export some necessary 32-bit entry points. 
2) modify OS/2 kernel so that it will call FS_CHGFILEPTRL, as required. The latter variant is possible if I'd 
convince OS/4 developers to do such an enhancement. But it will not work for those who stick with IBM's kernels.


=============
TIPS/HOWTO's:
=============

Using a 4 GB FAT16 partition with 64 KB cluster for StandAlone DUMPs: 
---------------------------------------------------------------------

It was discovered by me, that standard FAT OS2DUMP can be used to dump to a 4 GB FAT16 partition with 64 KB 
clusters. So, you create a 4 GB partition, with BIOS type 6 (FAT16 BIG), and a volume label "SADUMP". Such a 
file system can be created with a command:   

format /fs:fat16 /c:128     

Where 128 is the number of sectors per cluster: 64 KB == 128 sectors.   

Then you add the line:   

TRAPDUMP=R0,I:     

to your CONFIG.SYS (where I: is your 4 GB FAT16 drive) and reboot. You can test if creating the standalone dump 
begins by pressing a Ctrl-Alt-NumLock-NumLock (or Ctrl-Alt-F10-F10).   

The dumps of > 2GB are created successfully. I have 4 GB of RAM and a 3.7 GB dump file creates just fine. The 
4 GB FAT16 SADUMP partition is mounted fine by FAT32.IFS too. It can then be copied to a JFS partition and viewed by pmdf.exe.   

Note that at the moment, in FAT32.IFS, 64-bit seek does not work because a FS_CHGFILEPTRL routine does not gets called by the 
kernel. It looks that Scott Garfinkle not finished his 64-bit file support for 16-bit IFS'es, which he began making with 
DUMPFS.IFS.   

DUMPFS.IFS is a pure 16-bit IFS with support of files larger than 2 GB. Like with FAT32.IFS, big files can be copied 
successfully from a DUMPFS drive, but cannot be seeked beyond the 2 GB limit. It looks that Scott implemented some 
minimal functionality and did not finished the seek support. So, the 64-bit seek works only for 32-bit IFS-es, at the moment.   

As you could notice, you can now use FAT32.IFS instead of DUMPFS.IFS.   

The only problem with this is that if your machine has 4 GB of RAM, the full memory dump takes about a 30 minutes, which is 
very long. So, I'd advice to limit the available RAM to say, 512 MB, using a QSINIT loader (aka "Tetris"). This can be 
achieved by adding a ",memlimit=512" string to kernel parameters. After taking a dump, you can remove the "memlimit" string 
from os2ldr.ini, or leave it in a special menu item line which is used specially for dumping memory.   

VFDISK.SYS/VDISK.SYS/SVDISK.SYS/HD4DISK.ADD virtual disks   
---------------------------------------------------------

These drivers should work ok with latest FAT32.IFS versions. There are no special tips, everything should work out of the 
box. You just enable FAT support in FAT32.IFS via the /fat command line switch. FAT32.IFS then should mount on all FAT drives, 
including physical and virtual floppies. Also, FAT32 or exFAT ramdisks, like PAE ramdisk, or any other .ADD-based virtual 
harddisk, should work. Successfully tested so far are FORMAT/CHKDSK/SYSINSTX/LOADDSKF/SAVEDSKF/DISKCOPY on such drives. 
It should work the same way IBM's FAT works, the bonus feature is VFAT long file names support.   

Support for files > 4 GB on FAT/FAT32 (FAT+)   
--------------------------------------------

DOS people were always limited with FAT filesystem (FAT12/FAT16/FAT32) and it was always a big problem that the file size 
is limited to a 32-bit value in FAT. Video files and VM images are known examples of big files, for which a 32-bit value 
(which limits the file size to 4 GB) is insufficient. So, DR-DOS developers found out a way to store the files bigger than 
4 GB on FAT volumes. The specification was called FAT+. This specification (http://www.fdos.org/kernel/fatplus.txt) adds 
6 more bits to a file size by using some reserved bits in the directory entry. 2^(32+6) == 256 GB is maximum file size 
allowed. The FAT chain size itself is not limited by the FAT spec, limited is only the file size, which is addressed in 
the FAT+ spec.   

The reserved byte is 12-th from the beinning of a directory entry. Two bits of this byte, 3rd and 4th are reserved by 
WinNT for specifying that the file name or extension of this file is lower case (no LFN's are used, the file has 8.3 
filename). The bits 6th and 7th are used by fat32.ifs for marking file as having EA's or having critical EA's. For files 
having EA's, bits 6th and 7th are occupied too. So, bit 5th now means that the file size is set in special EA. The FAT+, 
version 3 spec suggests to use a FAT+FSZ EA for storing the 64-bit size value in EA's. As I can see, "+" sign in the EA 
name gives a ERROR_INVALID_EA_NAME error when trying to manipulate with such a file. So, I decided to use the FAT_PLUS_FSZ 
EA instead (which violates current spec, but it seems the spec is incorrect here, because it sugests to use an invalid EA 
name).   

So far, FAT+ support is now working. I was able to create a 40 GB file indeed, and it could be copied to another volume. 
The FAT+ support is enabled by the "/plus" command line switch. Note that /plus switch enables large files support too. 
Also, storing files with more than 35-bit size requires EA support (/eas switch) to be enabled. 35-bit size uses bits 0-2 
of 12th reserved byte (EA mark byte). 2^35 == 32 GB is the maximum file size with EA's disabled.   

Notes on large floppy media.   
----------------------------

Media without any partitions created, but with a single file system, is called Large Floppy. Such media has no partition 
table and is beginning from a boot sector, like ordinary floppy disk, but it is much larger (some gigabytes).   

Such media is frequently created by Windows. As it was known, OS2DASD.DMD/OS2LVM.DMD think that large floppies must be < 2 GB 
and formatted with FAT16. So, when OS/2 sees a big floppy, it mounts the kernel FAT driver onto it. So, there is currently no 
way to make OS/2 properly understand Large Floppies, except for OS2DASD/OS2LVM rewriting.   

But there is a workaround created by Lars Erdmann in his version of usbmsd.add. Lars emulates the 0 track together with 
partition table and DLAT sector with LVM info with default drive letter. So, the system actually sees some emulated 
partitionable medium, instead of the Large Floppy. This is done transparently when usbmsd.add sees the media beginning 
from the boot sector. Such media can be repartitioned by erasing the boot sector with zeroes. Then usbmsd.add disables 
emulation and it then works as usual.   

Large floppies can be safely formatted with FAT16/FAT32/exFAT and used with fat32.ifs. 

==================
TROUBLE SHOOTING:
==================

It seems like it is taking forever for the system to write to the removable drive

Disable the CACHEF32 by either remming out the CACHEF32.EXE statement in the config.sys
file or by adding the following option /L:OFF to the CACHEF32 statement. One can
temporarily disable lazywrite by going to a command prompt and typing CACHEF32.EXE /L:OFF

During installation, one or more of the packaged driver files fails to install

If installing over an earlier version, check the attribute of the file(s) in
question to make sure the files(s) attributes are not marked read only.  If this
is the case, remove the read only attribute from the files and install again.
If no FAT32 drive or partition is found, check the following:

Did you reboot after applying the driver?  Since entries were made to the
config.sys file, a reboot is necessary for the driver to be loaded.
On LVM (Logical Volume Manager) systems, did you use LVM to create a compatibility
volume and assign it a drive letter?  FDisk is no longer used on these systems.

On a non-LVM system, did you use one of the Partition Support Packages for non-LVM
systems? One of these packages is necessary in order for drive letters to be
assigned to the FAT32 partition. If a new drive letter is not assigned,
OS2DASD.DMD failed).

If you are not sure, try the /MONITOR parameter after FAT32.IFS, and after reboot
look with F32MON for FS_MOUNT  calls. Send the results to Netlabs.
If a new drive letter is assigned, but FAT32.IFS fails, please run F32PARTS.
If you have a TRAP, please send it with the CS:IP value of the trap.

The FAT32 drive is found, but the operating system is unable to read or write
to the drive

Try runnng chkdsk <drive>: /F on the drive in question.  It could be that the
drive still contains a dirty flag.

In addition to being unable to read/write to the drive, OS/2 tells you
the unit is 32Mb large or some other incorrect size

Try creating a new Master Boot Record (MBR) with the partition tables erased.
DFSee is a good program to do this.  If you have LVM, then create a new partition
using it.  If you do not have LVM, then use OS/2's FDISK, to create the new partition.
Remember, for non-removable hard drives using LVM, a compatibility volume must be
created.  Unfortunately, this means that all data on the drive will be lost. Backup
or copy your data and files to another drive.

When you double click on the drive formatted FAT32, you get a pop-up that says
"No objects were found that matched the specified find criteria" or "The drive
or diskette is not formatted correctly."

Try the two previous answers to see if this corrects your problem.

Also, check out the sections dealing with REMOVABLE MEDIA for more possible
solutions to the above problems.

You do not use or own a version of Windows, so how can you format the partition
FAT32

 See FORMATTING FAT32 VOLUMES

 You have EA support enabled, but EA support does not work properly

If you are having trouble with using EA,s and you are running version 0.97 or later,
run chkdsk <drive>: / F. Starting with version 0.97 and later, chkdsk must be run
prior adding EA support.

At bootup, you receive errors about file versions being different

Check to make sure you don't have more than one copy of FAT32.IFS or CACHEF32.EXE
on your system. Also, check to make sure you do not have files from different
versions installed.

During bootup, you receive a system trap

The system detected an internal processing error at location ##1200:04ba
- 0002:04ba.
65535,9051
FAT32:FSH_FORCENOSWAP on DATA Segment failed, rc=8

068606a0
Internal Revision 14.100c_W4

If you receive an error message similar to this, try adding the /H option to the

IFS=D:/OS2/BOOT/FAT32.IFS

statement in the config.sys file and rebooting.


Your formatted FAT32 USB drive shows a drive no greater than 32GB although the drive is
physically much larger.

USBMSD.ADD only reads drive geometry from a device and reports to os2dasd. Unfortunately many
new usb msd devices report CHS incorrectly or don't return it at all. CHS is the base of
OS/2 geometry detection and if it is returned incorrectly then OS2DASD recalculates it
to something strange. OS2DASD contains default CHS values and if you multiple them you
receive 32GB. You need to replace your old OS2DASD with the latest one.  If this doesn't
work, you can try Chris Wohlgemuth's USB driver (CWUSMSD.ADD).  CW recalculates geometry
and reports the recalculated one and not really received from a device.

During bootup, you receive a LINALLOC FAILED RC=32776 or other linalloc error message

Starting with version 0.99, a /H option can be added to the FAT32.IFS statement
in the CONFIG.SYS file to load cache memory into high memory.  This should eliminate
any LINALLOC FAILED error that has previously been occurring.

You prefer using one of the earlier versions of the FAT32 driver. What else can you
do to get rid of the LINALLOC FAILED message?

There are 5 things you can do:

Just ignore the error message
Don't use VFdisk
Add the statement EARLYMEMINIT=TRUE to the config.sys file.

This setting allows device drivers, etc., access to the memory above 16mb early in
boot. Previously, this was only available after Device Driver and IFS initialization
was completed. This setting requires an OS2KRNL dated 2002 or later.

Warning: This setting has various implications when enabled.

 1.Don't use with ISA cards with (busmaster-) DMA features.
 2.The Universal audio driver does not work with this setting (Trap 0008).
 3.AHA154X.ADD may do bad things to your system.
 4.There may be some settings of HPFS386 cache that are incompatible.

Try lowering the cache setting to 1034 MB or 512MB in the IFS=FAT32.IFS statement
found in the config.sys

Add the following VDisk setting to the config.sys file.

DEVICE=<PATH>\VFDISK.SYS 0

where "0" loads VFDisk as an "Ejected drive".

With this setting, vfdisk loads the driver into memory, but doesn't reserve memory
for a virtual floppy.  When one needs a virtual floppy, then use the control object
"vfctrlpm.exe" to make one.

To start your virtual disk automatically on startup, you can make a program object
of the "VFCTRL.EXE" program object and move the program object to the Startup folder.
Right click the "VFCTRL" program object and in its parameters field put the
drive: <media type>.

Example:  S: 4

A second way to do this would be to add VFCTRL.EXE drive: <media type> to the
STARTUP.CMD found in the systems root directory.

Example:  VFCTRL.EXE S: 4

A third way would be to add

CALL=<path>\VFCTRL.EXE drive: <media type>

to your CONFIG.SYS.


Example:  CALL=C:\OS2\VFCTRL.EXE S: 4

Note:  VFDISK.SYS assigns the drive letter without input from you.  As a result,
you will need to determine what drive letter VFDISK.SYS assigns before doing the
above three examples.


VFDISK Media Type

0 Ejected Drive

1 1.44 Mb 3.5" Floppy

2 1.20 Mb 5.25" Floppy

3 720 Kb 3.5" Floppy

4 2.88 Mb 3.5" Floppy

5 360 Kb 5.25" Floppy

6 1.84 Mb 3.5" Floppy


Note:  If you have a program that doesn't work or returns errors, please run
F32MON.EXE while you execute the program. After the error has occurred, terminate
F32MON and send a message describing what the problem is, as detailed as possible,
and include the FAT32.LOG that was created by F32MON to Netlabs or the Yahoo
FAT32USER group.


========
HISTORY:
========

Version 0.10:   

Revision r313 (valerius, Mon, 25 Sep 2017):   

 fat32.inf, ifs.inf: Fixed errors and warnings in the IPF code. 
  
Revision r312 (valerius, Sun, 24 Sep 2017):   

 ifs.inf: Additions to documentation. 
  
Revision r311 (valerius, Fri, 22 Sep 2017):   

CHKDSK fixes/enhancements 

 Support for fixing crosslinked clusters. 
 Support for fixing incorrect "." and ".." entries (wrong cluster number). 
  
Revision r310 (valerius, Sun, 17 Sep 2017):   

 fat32.ifs: Preliminary changes for /eas2 switch (ea data. sf support). 
  
Revision r309 (valerius, Sun, 17 Sep 2017):   

 SYS: Add preliminary exFAT support (bootblock does not fit into 8 sectors, yet). 
  
Revision r308 (valerius, Sun, 17 Sep 2017):   

 fat32.inf Documentation update. 
  
Revision r307 (valerius, Mon, 11 Sep 2017):   

 Add forgotten file. 
  
Revision r306 (valerius, Sun, 10 Sep 2017):   

 Fix for #58: lost EA files are recovered with paths prepended to a longname. 
  
Revision r305 (valerius, Sun, 10 Sep 2017):   

 64-bit bit ops: Add forgotten assembler files. 
 FAT+: Change FAT+FSZ EA to FAT_PLUS_FSZ, to avoid ERROR_INVALID_EA_NAME error when 
  copying this file. 
  
Revision r304 (valerius, Sun, 10 Sep 2017):   

 Delete unneeded tracepoints from FS_MOUNT. 
 Make ulDataLen equal to ulValidDataLen on exFAT (instead of being equal to rounded 
  up to a cluster size value). 
  
Revision r303 (valerius, Sun, 10 Sep 2017):   

 FAT+ support in the IFS and CHKDSK. 
  
Revision r302 (valerius, Sun, 10 Sep 2017):   

 change IBM's DDK headers to our own ones. 
  
Revision r301 (valerius, Wed, 30 Aug 2017):   

fat32.ifs: exFAT fixes   

 Avoid using CritMessage, because it: 1) terminates calling program, with general use 
  2) Shows an unremovable popup, when in boot time. So, avoid using CritMesage. 
 Add a filename argument to ModifyDirectory(MODIFY_DIR_UPDATE), instead of NULL, so 
  that it should look up dir entries without a cluster name (zero-size files) correctly. 
  So, always pass pszFile argument. 
 Fix CompactDir1, so it is now correctly compacts the directory. 
 TranslateName fixes for exFAT case. 
 ModifyDirectory fixes (support for dir entry set crossing the block boundary), exFAT case 
 Disable importing two KEE calls (repair Merlin/Warp3 compatibility) 
 free up the pDirSHInfo on file close (was on FS_OPENCREATE exit), so that, no trap when 
  it is accessed on FS_COMMIT after being freed. 
  
Revision r300 (valerius, Wed, 30 Aug 2017):   

.INF documentation additions and corrections 
  
Revision r299 (valerius, Mon, 31 Jul 2017):   

 Make TranslateName implementation for exFAT. 
 Fix loaddskf on a FAT12 floppy mounted by fat32.ifs. So, SetVPB   kernel routine, which overwrote 
  vpfsd with FAT-specific data, doesnt   gets called, and hence, no IPE when fat32.ifs detects it. 
  Also, prevent   calling MarkDiskStatus in FS_FLUSHBUF and FS_SHUTDOWN on FAT12 removables, this 
  avoids another trap in DoVolIO kernel routine when doing FS_FLASHBUF. 
 Fix a typo in DeleteFatChain, so ulBmpSector is used, instead of ulSector. 
  
Revision r298 (valerius, Fri, 28 Jul 2017):   

A fix for sectros per FAT < 3. Now it should work with 360 KB diskettes. 
  
Revision r297 (valerius, Tue, 25 Jul 2017):   

 Change USHORT to ULONG in some places, to avoid overflow in case of FAt12/FAT16 partitions 
  with a 64 KB cluster. Otherwise we could get division by zero in some cases. 
  
Revision r296 (valerius, Sun, 23 Jul 2017):   

fat32.ifs: Add system trace support. 
  
Revision r295 (valerius, Thu, 20 Jul 2017):   

 Disable Lars Erdman's code for searching DevCaps and Strat2 routine if it is normally not 
  found. This found strat2 even in case no strat2 is presented by the disk driver (like 
  hd4disk.add with an "/1" parameter). 
 Consider using fSilent flag when loading Unicode Translate Table, instead of being always verbose. 
 Set pVolInfo->fDiskClean to FALSE in WriteSector if Dirty flag in the 1th FAT element is set to 
  not do it on every WriteSector call. 
 Swapping code updates 
 FS_FILEIO implementation 
  
Revision r294 (valerius, Mon, 17 Jul 2017):   

fat32.ifs: exFAT fixes.   

 Add required parentheses in functions for calculating checksums. Now checksums should be ok. 
 Fix a bug with deleting file while renaming it. 
  
Revision r293 (valerius, Sun, 16 Jul 2017):   

FORMAT: Revert previous commit, as it is wrong. params->sectors_per_cluster fit large cluster 
numbers, while dp.SectorsPerCluster is not. And it can be zero. 
  
Revision r292 (valerius, Sun, 16 Jul 2017):   

FORMAT: Use dp.SectorsPerCluster instead of params->sectors_per_cluster (it may be zero in 
some cases, so it cause FORMAT trap). 
  
Revision r292 (valerius, Sun, 16 Jul 2017):   

fat32.ifs: Some minor fixes   

 Initialize several variables to NULL. So that, no error occurs when it tries to free() 
  these variables. This fixes ERROR_NOT_COPY returned in FM/2 and the file manager copies 
  everything well between two FAT drives. 
 Trying to fix errors with swapping 
 Minimize FAT access semaphore acquiring time. So, less probability for timeouts on the semaphore. 
  
Revision r290 (valerius, Mon, 10 Jul 2017):   

 Fix a buffer overrun in FS_READ. 
 Fix seconds vs twosecs error in timestamps. 
 Fix erroneous counting of files in the directory on file delete in FS_RMDIR. Wrong nomber of files counted. 
  
Revision r289 (valerius, Thu, 06 Jul 2017):   

 Fix skipping 2nd cluster on exFAT when cluster size is 128+ KB when reading and writing files. 
 Make FORMAT create FS'es with 128 KB or more clusters. Support the case with a very small (1kb or so) clusters, when the allocation bitmap uses many clusters, so they don't fit into one FAT sector. 
 Add support for adding timestamps for files created by CHKDSK. 
  
Revision r288 (valerius, Tue, 04 Jul 2017):   

FORMAT: Make volumes formatted with our FORMAT, understandable by winxp exFAT driver. 
  
Revision r287 (valerius, Tue, 04 Jul 2017):   

fat32.ifs: Fix seeking to a cluster for exFAT. Now archives are entered correctly. 
  
Revision r286 (valerius, Mon, 03 Jul 2017):   

fat32.ifs: Fix some problems remained in previous revision.   

 Fix a trap 000d caused by unzeroed variables. 
 Move check for bad sectors from ReadSector to ReadBlock and WriteBlock. 
 Fix allocating new clusters in SetNextCluster in exFAT code. 
 Change unlink() to DelFile() and avoid calling filesystem access functions in CHKDSK when FS is not accessible. 
  
Revision r285 (valerius, Sun, 02 Jul 2017):   

ifs.inf: Documentation updates. 
  
Revision r284 (valerius, Sun, 02 Jul 2017):   

fat32.ifs: Make more conservative stack usage.   

 Use less stack space. Change all local buffers to dynamically   allocated buffers. This should fix kernel stack overflow errors. 
  
Revision r283 (valerius, Tue, 20 Jun 2017):   

CHKDSK: Additional exFAT-related fixes. 
  
Revision r282 (valerius, Sun, 18 Jun 2017):   

 Different exFAT-related additions for CHKDSK 
 Return "unimplemented" on SYSINSTX attempts 
 Attempts to fix traps in malloc() in exFAT CHKDSK code. It appears that heap is corrupted somewhere. Also, added experimental mem_alloc2() function, to allocate memory via a CHKDSK.SYS driver (non-working, yet). 
  
Revision r281 (valerius, Sun, 18 Jun 2017):   

fat32.ifs: Identtify itself as FAT32, not UNIFAT anymore.   

 Some programs treat FAT32 drives specially and know nothing about UNIFAT. Though it is wrong, I don't want break such programs. So, since now, I disable IFS identification as UNIFAT. Now it should be FAT32, as previous. 
 Return back the bad sectors checking in ReadSector2, and return ERROR_SECTOR_NOT_FOUND to avoid reading zero sectors. 
  
Revision r280 (valerius, Wed, 14 Jun 2017):   

fat32.ifs: Some previously forgotten fixes.   

 Move InitCache back from FS_INIT to FS_MOUNT (as it uses some DevHelp's which cannot be used in r3 context). 
 More proper handling of exFAT dir entries in two places. 
 Some forgotten declarations in headers. 
  
Revision r279 (erdmann, Tue, 13 Jun 2017):   

merge Valerys changes 
  
Revision r278 (valerius, Tue, 13 Jun 2017):   

CHKDSK: prepare CHKDSK for exFAT support. 
  
Revision r277 (valerius, Tue, 13 Jun 2017):   

CHKDSK: repair PMCHKDSK. 
  
Revision r276 (valerius, Thu, 08 Jun 2017):   

CHKDSK: Fix CHKDSK logic error, introduced in previous commit.   

 Fix incorrect logic in ChkDskMain: CHKDSK has quit instead of checking the disk. 
  
Revision r275 (valerius, Thu, 08 Jun 2017):   

fat32.ifs: Fix minor error occured with MSC. 
  
Revision r274 (valerius, Thu, 08 Jun 2017):   

fat32.ifs: Define whether to use static or dynamic buffers via a define.   

 If USE_STATIC_BUFS is set, use static variables for sector buffers in ReadSector2, FindPathCluster0/1, ModifyDirectory0/1, TranslateBuffer. Access to these buffers is got via a semaphore. If USE_STATIC_BUFS is not set, create buffers via malloc and dispose of them via free. Here, the problem with trap in malloc is present. There is a trap 0008 somewhere in FSH_SEGALOC, maybe because of too much selectors allocated (a hypothesis). Possible solution: rewrite malloc/free to use less selectors (not to allocate a selector to each small piece of memory, try to cover more memory by a single selector). 
 Disk autocheck enhancements. In f32chk.exe, add checks for pointer to argv[i] != 0 when parsing CHKDSK command line. Don't output '\n''s after checking each disk. Make output look more beautiful. 
  
Revision r273 (valerius, Wed, 07 Jun 2017):   

fat32.ifs: Split fat32.c to two files, to avoid the Segment too large error. 
  
Revision r272 (valerius, Sun, 04 Jun 2017):   

build system: Fix a minor build error with cmd.exe as a shell. 
  
Revision r271 (valerius, Sat, 03 Jun 2017):   

fat32.ifs: Use dynamically allocated buffers for the time being. 
  
Revision r270 (erdmann, Fri, 02 Jun 2017):   

revert change in ReadSector2: it's possible to read from before the actual data sectors (reading FAT for example) 
  
Revision r269 (erdmann, Thu, 01 Jun 2017):   

merging Valerys changes 
  
Revision r268 (valerius, Thu, 01 Jun 2017):   

fat32.ifs: #ifdef the unused variables out. Enable/disable exFAT support in MSC makefile. 
  
Revision r267 (valerius, Thu, 01 Jun 2017):   

fat32.ifs: Fix broken edits from r266. 
  
Revision r266 (valerius, Wed, 31 May 2017):   

Enable creating the builds without exFAT support. 
  
Revision r265 (erdmann, Wed, 31 May 2017):   

fixing "GetChainSize" (usSectorsRead was not properly initialized, also throw away all garbage), move macros "Cluster2Sector" and "Sector2Cluster" into the central header file 
  
Revision r264 (erdmann, Wed, 31 May 2017):   

fixing a fatal hang in "ReadSector2" but we still fail to execute successfully because the requested sector sometimes is located before the start of the partition which it should not be... 
  
Revision r263 (erdmann, Wed, 31 May 2017):   

readd "SemRequest" routine 
  
Revision r262 (erdmann, Wed, 31 May 2017):   

merging Valerys changes to allow building with MS C 
  
Revision r261 (erdmann, Wed, 31 May 2017):   

properly preset some return values 
  
Revision r260 (valerius, Wed, 31 May 2017):   

fat32.ifs: Make MSC build working   

 Add missing "else" statement in "vsprintf". So that, "%llx" format string is now processed correctly. 
 Support for compilers without "long long" type support. In particular, fixed build with MSC compiler. 
 Trying to fix problems with traps when intensively using malloc/free. Now I changed buffers, allocated via malloc, in several places, to static buffers. For example, in ReadSector, FindPathCluster, ModifyDirectory, TranslateName. The buffers are accessed by acquiring a corresponding semaphore. However, it slows down the performance. 
  
Revision r259 (erdmann, Fri, 26 May 2017):   

set CPU type properly to support "pause" instruction 
  
Revision r258 (erdmann, Fri, 26 May 2017):   

implementing spinlocks (we need something that can be called nested which the OS provided ones won't support), also move definitions of routines "GetFatAccess" and "ReleaseFat" to common header file "fat32ifs.h" so that we don't have to change the prototype at two different places 
  
Revision r257 (erdmann, Tue, 23 May 2017):   

remove all Windows related build products 
  
Revision r256 (erdmann, Tue, 23 May 2017):   

merging Valerys latest changes 
  
Revision r255 (valerius, Fri, 19 May 2017):   

fat32.ifs: Fix file creation. (There were Entry type not set). 
  
Revision r254 (valerius, Wed, 17 May 2017):   

fat32.ifs: Return back the old variant of pre-DOS-4.0 FAT BPB detection. Otherwise NTFS volumes could be erroneously mounted. 
  
Revision r253 (valerius, Wed, 17 May 2017):   

fat32.ifs: Move several fields from FINDINFO to FINFO, so now FINDINFO does not exceed the limit of 24 bytes. 
  
Revision r252 (erdmann, Tue, 16 May 2017):   

revert change in "FS_FILEINFO": if largefile support is active, psffsi->sfi_sizel is also used for FIL_STANDARD and FIL_QUERYEASIZE 
  
Revision r251 (erdmann, Tue, 16 May 2017):   

Created branch lars. 
  
Revision r250 (valerius, Sun, 14 May 2017):   

 Fixes for #40 with FS_FINDFIRST/FS_FINDNEXT regarding FIL_QUERYEASFROMLIST/FIL_QUERYEASFROMLISTL: return a minimum required FEALIST (otherwise a loop calling FS_FINDNEXT is observed). 
 The same fixes for exFAT case 
 Fix returning EA's on exFAT. Now WPS window with exFAT disk is opened successfully (but WPS still traps then, because creating files does not work - it tries to create WP ROOT. SF) Author: Lars Erdmann (with exFAT-related fixes by valerius). 
  
Revision r249 (valerius, Mon, 08 May 2017):   

 Additional fixes in FS_MOUNT regarding the Volume Label and Serial number setting 
 Identify itself as UNIFAT if /fat or /exfat are set, instead of FAT32 (to avoid confusion when FAT16 drives are reported as being FAT32) 
 Added several forgotten changes regarding FIL_QUERYEASFROMLISTL vs FIL_QUERYEASFROMLIST 
  
Revision r248 (valerius, Tue, 02 May 2017):   

FORMAT: exFAT support in FORMAT. 
  
Revision r247 (valerius, Tue, 02 May 2017):   

fat32.ifs: Additional exFAT-related fixes. 
  
Revision r246 (valerius, Tue, 02 May 2017):   

fat32.ifs. Additional exFAT-related fixes. 
  
Revision r245 (valerius, Tue, 02 May 2017):   

fat32.ifs: FS_MOUNT fixes: support for diskettes without a BPB and VolLabel/VolSerNo-related fixes. 
  
Revision r244 (valerius, Tue, 02 May 2017):   

fat32.ifs: Use dup VPB only if special magic is present. 
  
Revision r243 (valerius, Tue, 02 May 2017):   

fat32.ifs: Use dup VPB only if special magic is present. 
  
Revision r242 (valerius, Sun, 23 Apr 2017):   

fat32.ifs: Additional exFAT-related enhancements. 
  
Revision r241 (valerius, Wed, 19 Apr 2017):   

fat32.ifs: exFAT-related updates. 
  
Revision r240 (valerius, Wed, 19 Apr 2017):   

docs: Documentation update. 
  
Revision r239 (valerius, Wed, 19 Apr 2017):   

ufat32.dll: Check for recommended BPB if no real one. 
  
Revision r238 (valerius, Wed, 12 Apr 2017):   

fat32.ifs: exFAT support: Support for FS_FSINFO/FS_CHDIR and FS_FIND[FIRST/NEXT/CLOSE]. 
  
Revision r237 (valerius, Wed, 12 Apr 2017):   

FORMAT: Autodetect the FAT type based on disk size. 
  
Revision r236 (valerius, Sun, 09 Apr 2017):   

cachef32.exe: Force FAT12/FAT16 disks remount on cachef32 start (so, we got fat32.ifs mounted on them). 
  
Revision r235 (valerius, Sun, 09 Apr 2017):   

fat32.ifs: Fix MarkDiskStatus (disk status was written into incorrect FAT sector). 
  
Revision r234 (valerius, Sat, 08 Apr 2017):   

fat32.ifs: Don't set disk status after checking/formatting disk.   

Don't update dirty flag after CHKDSK/FORMAT/etc, so we don't get an error during unmount, and then, we don't get a SIGKILL signal when doing DSK_REDETERMINEMEDIA ioctl on remount. So, now CHKDSK/FORMAT terminates successfully. 
  
Revision r233 (valerius, Fri, 07 Apr 2017):   

SYS: SYS support for FAT12/FAT16. 
  
Revision r232 (valerius, Fri, 07 Apr 2017):   

docs: Add notes.txt. 
  
Revision r231 (valerius, Fri, 07 Apr 2017):   

FORMAT: Make FORMAT support formatting to FAT12/FAT16. 
  
Revision r230 (valerius, Fri, 07 Apr 2017):   

Non-512 byte sector compatibility fixes. Now it works with CD's with FAT filesystem too. 
  
Revision r229 (valerius, Wed, 05 Apr 2017):   

Read three sectors of FAT at once (to read a whole number of FAT12 entries). 
  
Revision r228 (valerius, Wed, 05 Apr 2017):   

build system: Fix deps in makefiles. 
  
Revision r227 (valerius, Sun, 02 Apr 2017):   

fat32.ifs: Correct a small syntax error. 
  
Revision r226 (valerius, Sun, 02 Apr 2017):   

UFAT32.DLL: FAT12/FAT16 fixes. 
  
Revision r225 (valerius, Sun, 02 Apr 2017):   

fat32..ifs: FAT12/FAT16 fixes. 
  
Revision r224 (valerius, Sun, 02 Apr 2017):   

build system: Build system improvements. 
  
Revision r223 (valerius, Sun, 02 Apr 2017):   

fat32.ifs: 32-bit entry points. Add forgotten file. 
  
Revision r222 (valerius, Sun, 02 Apr 2017):   

build system: Compress binaries with lxlite. 
  
Revision r221 (valerius, Sun, 02 Apr 2017):   

CHKDSK: Save lost cluster chains into a separate directory. 
  
Revision r220 (valerius, Sun, 02 Apr 2017):   

fat32.ifs: Succeed the IFS init in case of Merlin kernels and large file support is enabled. 
  
Revision r219 (valerius, Sun, 02 Apr 2017):   

FS utilities: move unicode translate table loading to UFAT32.DLL and export it. 
  
Revision r218 (valerius, Sun, 02 Apr 2017):   

FS utilities: move unicode translate table loading to UFAT32.DLL and export it. 
  
Revision r217 (valerius, Sun, 02 Apr 2017):   

fat32..ifs: Autocheck enhancements. 
  
Revision r216 (valerius, Sun, 02 Apr 2017):   

fat32.ifs: Preliminary changes to add the 32-bit entry points. 
  
Revision r215 (valerius, Sun, 02 Apr 2017):   

UFAT32.DLL: Add forgotten file. 
  
Revision r214 (valerius, Fri, 17 Mar 2017):   

fat32.ifs: Add command line switches to set mounted disks lists/masks. 
  
Revision r213 (valerius, Fri, 16 Mar 2017):   

Add FAT12/FAT16 support.   

Refactor code to support generic FAT, including FAT12/FAT16/FAT32/exFAT. This time, add support for FAT12/FAT16 to fat32.ifs and CHKDSK. 
  
Revision r212 (valerius, Sun, 12 Mar 2017):   

fat32.ifs: Fix looping when inserting a directory entry. 
  
Revision r211 (valerius, Sat, 11 Mar 2017):   

util: Rename again diskinfo -> f32parts, remove diskdump from packages. 
  
Revision r210 (valerius, Sat, 11 Mar 2017):   

fat32.ifs: Fix uninitialized variable. 
  
Revision r209 (valerius, Sat, 11 Mar 2017):   

fat32.ifs: Fix #25. (executable file corruption). 
  
Revision r208 (valerius, Sat, 11 Mar 2017):   

fat32.ifs: Support for subcluster blocks.   

Read or write clusters by blocks of 32 KB or less. This allows to use clusters, bigger than 32 KB. So that, 64 KB clusters in FAT32, or clusters up to 32 MB in exFAT, could be supported with a 16-bit FAT driver. 
  
Revision r207 (valerius, Thu, 02 Mar 2017):   

UFAT32.DLL: Add 16-bit signal handler.   

Add 16-bit signal handler, in case we're using 16-bit frontend program. So that, we can interrupt it by Ctrl-C and disk will remount. Add Help for CHKDSK and SYS. Run CHKDSK/SYS only in case the disk is FAT32 (check BPB for "FAT32   " string). 
  
Revision r206 (valerius, Tue, 28 Feb 2017):   

UFAT32.DLL: Support for creating chkdsk.old. 
  
Revision r205 (valerius, Tue, 28 Feb 2017):   

UFAT32.DLL: Enhancements for messages output to log. 
  
Revision r204 (valerius, Mon, 20 Feb 2017):   

UFAT32.DLL: Fix date/time when creating/modifying dir. entries. 
  
Revision r203 (valerius, Mon, 20 Feb 2017):   

UFAT32.DLL: Try not to use SECTORIO ioctl.   

Try not to use SECTORIO ioctl, use ordinary byte mode, instead of sector mode. Also, recode win32 API error descriptions from ANSI to OEM codepage. And, use a buffer with zero padding for filename, when calling MakeDirEntry().   

Revision r202 (valerius, Sat, 18 Feb 2017):   

UFAT32.DLL: More sector size related changes. 
  
Revision r201 (valerius, Sat, 18 Feb 2017):   

CHKDSK: Fix CHKDSK after r198.   

The bootsector was read when sector size in BPB was uninitialized. So, do get_drive_params() first.   

Revision r200 (valerius, Fri, 17 Feb 2017):   

Build system: include those .wmp lines to .map, which have address with + at the end. 
  
Revision r199 (valerius, Fri, 17 Feb 2017):   

FORMAT: Don't set partition type if disk is GPT. 
  
Revision r198 (valerius, Fri, 17 Feb 2017):   

UFAT32.DLL: Use sector size from BPB instead of hardcoded SECTOR_SIZE. 
  
Revision r197 (valerius, Thu, 16 Feb 2017):   

SYS: Add dummy os2boot. 
  
Revision r196 (valerius, Thu, 16 Feb 2017):   

packages: Packaging fix. 
  
Revision r195 (valerius, Thu, 16 Feb 2017):   

SYS: Add SYS standalone version. 
  
Revision r194 (valerius, Thu, 16 Feb 2017):   

Add f32chk directory, which was not committed, for some reason. 
  
Revision r193 (valerius, Thu, 16 Feb 2017):   

UFAT32.DLL: Make FORMAT and CHKDSK more portable.   

Make FS utilities more portable. Move all system-dependent functions to os2.c. Add CHKDSK standalone version. Also, FORMAT and CHKDSK now successfully build for win32 target. Rename fat32chk.exe to f32chk.exe. Now CHKDSK and FORMAT standalone versions are called fat32chk.exe and fat32fmt.exe, for consistency. Add win32 makefile. 
  
Revision r192 (valerius, Tue, 14 Feb 2017):   

build system: Add forgotten changes from previous commit. 
  
Revision r191 (valerius, Tue, 14 Feb 2017):   

UFAT32.DLL Use more portable API's.   

Use libc and other system-independent interfaces instead of OS/2 API's. This should be useful to create DOS and win32 versions of CHKDSK and SYSINSTX, together with FORMAT. Also, done some code cleanup. 
  
Revision r190 (valerius, Mon, 13 Feb 2017):   

CHKDSK: Change more messages to standard oso001.msg messages. 
  
Revision r189 (valerius, Mon, 13 Feb 2017):   

CHKDSK: Change more messages to standard oso001.msg messages. 
  
Revision r188 (valerius, Mon, 13 Feb 2017):   

UFAT32.DLL: Manage all messages (to screen/CHKDSK log file, from oso001.msg and other messages) from one point. 
  
Revision r187 (valerius, Mon, 13 Feb 2017):   

CHKDSK: Make UFAT32.DLL silent if we're doing autocheck and FS is clean. 
  
Revision r186 (valerius, Mon, 13 Feb 2017):   

UFAT32.DLL: Support for CHKDSK/FORMAT /P command line switch. 
  
Revision r185 (valerius, Sun, 12 Feb 2017):   

CHKDSK, fat32.ifs: Change USHORT->ULONG in several places, to support 64k clusters. 
  
Revision r184 (valerius, Sat, 11 Feb 2017):   

fat32.ifs: Allow read/write/setfileptr on volumes opened in DASD mode. 
  
Revision r183 (valerius, Sat, 11 Feb 2017):   

CHKDSK: Add missing braces. 
  
Revision r182 (valerius, Sat, 11 Feb 2017):   

partfilt.flt: Eliminate compiler warnings. 
  
Revision r181 (valerius, Sat, 11 Feb 2017):   

CHKDSK: Don't use file API's in CHKDSK.   

Avoid using API's like DosQueryPathInfo in CHKDSK, because the volume is remounted in MOUNT_ACCEPT mode and file API's are unavailable, and an attempt to use them may lead to a trap. Use internal CHKDSK functions instead. 
  
Revision r180 (valerius, Sat, 11 Feb 2017):   

fat32.ifs: Deny access to a volume if it is mounted in MOUNT_ACCEPT mode, thus avoiding a trap. 
  
Revision r179 (valerius, Fri, 10 Feb 2017):   

CHKDSK: Enable creating of chkdsk.log without using DosWrite.   

Add support for creating a file by CHKDSK on it's own, without using file API's like DosWrite, thus avoiding the use of IFS services. So, we can use this at autocheck time, when IFS is not initialized, yet. 
  
Revision r178 (valerius, Fri, 10 Feb 2017):   

fat32.ifs: Allow opening a dirty volume with OPEN_FLAGS_DASD to allow checking/formatting it. 
  
Revision r177 (valerius, Fri, 10 Feb 2017):   

fat32.ifs: Don't let trying to insert a new entry in a full directory cluster, and thus, exceeding a segment limit (which could lead to a trap). 
  
Revision r176 (valerius, Fri, 10 Feb 2017):   

fat32.ifs: Fix failing to discover large file API presence. 
  
Revision r175 (valerius, Mon, 06 Feb 2017):   

CHKDSK: CHKDSK log support. 
  
Revision r174 (valerius, Sun, 05 Feb 2017):   

CHKDSK: Add fflush(stdout) for the user to see the lost clusters message. 
  
Revision r173 (valerius, Sun, 05 Feb 2017):   

CHKDSK: Set timestamp for recovered lost chains. 
  
Revision r172 (valerius, Sun, 05 Feb 2017):   

fat32.ifs: Don't allow disk access if it is dirty. 
  
Revision r171 (valerius, Sun, 05 Feb 2017):   

CHKDSK: Update CHKDSK messages. 
  
Revision r170 (valerius, Sat, 24 Dec 2016):   

build system: Fixed bldlevel string. 
  
Revision r169 (valerius, Sun, 04 Dec 2016):   

build system: Another WarpIN packaging bug fixed. 
  
Revision r168 (valerius, Sun, 04 Dec 2016):   

build system: Minor WarpIN packaging bug fixed. 
  
Revision r167 (valerius, Sun, 04 Dec 2016):   

build system: Separate .sym files to additional WarpIN package. 
  
Revision r166 (komh, Sat, 26 Nov 2016):   

Move branches/fat32-0.10 to trunk   

valerius merged all changes of trunk to 0.10 branch, and many improvements are applied to 0.10 branch.   

So move trunk to branches/trunk-old for a backup, and 0.10 branch to trunk.   

See ticket #26 for details. 
  
Revision r165 (komh, Sat, 26 Nov 2016):   

Move trunk to branches/trunk-old   

valerius merged all changes of trunk to 0.10 branch, and many improvements are applied to 0.10 branch. So move trunk to branches/trunk-old for a backup, and 0.10 branch to trunk.   

See ticket #26 for details. 
  
Revision r164 (valerius, Mon, 21 Nov 2016):   

docs: Documentation update. 
  
Revision r163 (valerius, Mon, 21 Nov 2016):   

fat32.ifs: Update FS status (clean/dirty) on shutdown, continue with next volumes if something went wrong with the current one. 
  
Revision r162 (valerius, Wed, 16 Nov 2016):   

build system: Small enhancements. 
  
Revision r161 (valerius, Tue, 15 Nov 2016):   

build system: Fix broken ufat32.dll build. 
  
Revision r160 (valerius, Tue, 15 Nov 2016):   

build system: Support for separate build and source dirs, and also, autopackaging. 
  
Revision r159 (valerius, Mon, 14 Nov 2016):   

bldsystem: Minor changes to bldlevel creation. 
  
Revision r158 (valerius, Mon, 14 Nov 2016):   

build system: Automatically add extra info to bldlevel of each binary. 
  
Revision r157 (valerius, Sun, 13 Nov 2016):   

fat32.ifs: Avoid to enable large files support to prevent a trap when accessing sfi_sizel/sfi_positionl if kernel does not support DosOpenL & Co. 
  
Revision r156 (valerius, Thu, 10 Nov 2016):   

fat32.ifs: Fix for trap 000d in ReadSector when trying to allocate a buffer for a 64k cluster. 
  
Revision r155 (valerius, Thu, 10 Nov 2016):   

fat32.ifs: Fix for division by zero on a JFS partition on mount, when booting from a fat32 medium. 
  
Revision r154 (valerius, Thu, 10 Nov 2016):   

fat32.ifs: Code cleanup and formatting in FS_MOUNT. 
  
Revision r153 (valerius, Mon, 07 Nov 2016):   

fat32.ifs: Return ERROR_INVALID_PARAMETER, like hpfs.ifs does. 
  
Revision r152 (valerius, Mon, 07 Nov 2016):   

fat32.ifs: Files up to 4 GB support.   

Revision r151 (valerius, Mon, 07 Nov 2016):   

fat32.ifs: Check if size/file pos. does not exceed 2 or 4 Gb. 
  
Revision r150 (valerius, Fri, 04 Nov 2016):   

Support for 64 KB clusters. 
  
Revision r149 (valerius, Wed, 02 Nov 2016):   

fat32.ifs: Prevent blocking in FSH_SETVOLUME when remounting after format. 
  
Revision r148 (valerius, Thu, 27 Oct 2016):   

fat32.ifs: Fix for ERROR_SEM_TIMEOUT error in f32mon.exe. 
  
Revision r147 (valerius, Thu, 27 Oct 2016):   

fat32.ifs: Code style fix. 
  
Revision r146 (valerius, Wed, 26 Oct 2016):   

fat32.ifs: Some previously uncommitted changes flush (FS_IOCTL code didn't went through, for some reason). 
  
Revision r145 (valerius, Wed, 26 Oct 2016):   

fat32.ifs. Some previously uncommitted changes flush. 
  
Revision r144 (valerius, Wed, 26 Oct 2016):   

fat32.ifs: Some previously uncommitted changes flush. 
  
Revision r143 (valerius, Wed, 26 Oct 2016):   

fat32.ifs: Use QSINIT/OS4LDR log, if it is detected, otherwise send a string directly to a com port. 
  
Revision r142 (valerius, Wed, 26 Oct 2016):   

fat32.ifs: Add support for QSINIT/OS4LDR log buffer. 
  
Revision r141 (valerius, Sun, 23 Oct 2016):   

fat32.ifs: Temporarily disable lazy write start in FAT32_STARTLW ioctl worker. 
  
Revision r140 (valerius, Sun, 23 Oct 2016):   

fat32.ifs: Always do flush volume etc. on FS unmount. 
  
Revision r139 (valerius, Sun, 23 Oct 2016):   

format: Add start/stop lazy write ioctls. 
  
Revision r138 (valerius, Sun, 23 Oct 2016):   

format: Some error checking. 
  
Revision r137 (valerius, Sun, 23 Oct 2016):   

format: Add reserved sectors command line option. 
  
Revision r136 (valerius, Fri, 14 Oct 2016):   

Merge changes with trunk. 
  
Revision r135 (valerius, Fri, 14 Oct 2016):   

fat32.ifs Preliminary swap support (not working atm). 
  
Revision r134 (valerius, Fri, 14 Oct 2016):   

makefiles: Use version string in makefile.mk, and other makefiles including it. 
  
Revision r133 (valerius, Fri, 14 Oct 2016):   

format: Use sector mode for formatting.. 
  
Revision r132 (valerius, Sat, 08 Oct 2016):   

fat32.ifs: Add checks for removables to be unmounted. 
  
Revision r131 (valerius, Mon, 07 Oct 2016):   

scripts: Add @echo off. 
  
Revision r130 (valerius, Mon, 07 Oct 2016):   

format: Added FAT32_SECTORIO ioctl for better speed. 
  
Revision r129 (valerius, Mon, 07 Oct 2016):   

format: Fix format failing on already FAT32 formatted drives. 
  
Revision r128 (valerius, Mon, 07 Oct 2016):   

scripts: Make a single environment-setting script in the root dir, and others calling it. 
  
Revision r127 (valerius, Mon, 05 Sep 2016):   

ufat32.dll: Added missing recover.c. 
  
Revision r126 (valerius, Sun, 04 Sep 2016):   

Additional autocheck on boot changes. 
  
Revision r125 (valerius, Sun, 04 Sep 2016):   

ufat32.dll: Fix for reading/writing sectors: Correct the amount of bytes to write on the current iteration. 
  
Revision r124 (valerius, Wed, 24 Aug 2016):   

ufat32.dll: Add partition type modifying to FAT32. 
  
Revision r123 (valerius, Wed, 24 Aug 2016):   

ufat32.dll: Add preliminary SYS command. 
  
Revision r122 (valerius, Wed, 24 Aug 2016):   

Makefiles: Add root makefile. Add clean target. 
  
Revision r121 (valerius, Wed, 24 Aug 2016):   

Makefiles Add root makefile. Add clean target. 
  
Revision r120 (valerius, Sun, 21 Aug 2016):   

ufat32.dll: Make CHKDSK to set volume clean. 
  
Revision r119 (valerius, Sun, 21 Aug 2016):   

fat32.ifs: Delete forgotten debug messages from FS_DELETE. 
  
Revision r118 (valerius, Sun, 21 Aug 2016):   

Fix trap in FS_DELETE when rewriting files and disk is dirty. 
  
Revision r117 (valerius, Sun, 21 Aug 2016):   

FAT32 autocheck on init. Removed ioctl and fsctl calls to fat32.ifs from CHKDSK and ported the corresponding code from fat32.ifs to CHKDSK. 
  
Revision r116 (valerius, Wed, 17 Aug 2016):   

fat32.ifs: Fixed bldlevel strings. 
  
Revision r115 (valerius, Wed, 17 Aug 2016):   

fat32.ifs: Fix a trap after FS_MOUNT on REDETERMINEMEDIA ioctl. Added push es/pop es on enter/exit of each top-level IFS routine. 
  
Revision r114 (valerius, Sat, 02 Jul 2016):   

fat32-0.10: Ticket #16 fixed. added floating point support inlining and initinstance/terminstance. 
  
Revision r113 (valerius, Mon, 04 Jan 2016):   

Additional __loadds to _loadds 
  
Revision r112 (valerius, Mon, 04 Jan 2016):   

AWK script OW->VAC for map files update 
  
Revision r111 (valerius, Mon, 04 Jan 2016):   

Build .cmd files for convenience 
  
Revision r110 (valerius, Mon, 04 Jan 2016):   

Misc non-important files 
  
Revision r109 (valerius, Mon, 04 Jan 2016):   

Change __loadds to _loadds 
  
Revision r108 (valerius, Mon, 04 Jan 2016):   

Makefile changes for ufat32.dll 
  
Revision r107 (valerius, Mon, 04 Jan 2016):   

Makefile changes for ufat32.dll 
  
Revision r106 (valerius, Mon, 04 Jan 2016):   

Makefile changes for FS utilities 
  
Revision r105 (valerius, Mon, 04 Jan 2016):   

newer fat32.txt 
  
Revision r104 (valerius, Mon, 04 Jan 2016):   

Added .ipf files of ifs and fat32 .inf's 
  
Revision r103 (valerius, Mon, 04 Jan 2016):   

Minor headers changes 
  
Revision r102 (valerius, Mon, 04 Jan 2016):   

Make partfilt.flt build with OW and MSC 
  
Revision r101 (valerius, Sun, 22 Mar 2015):   

Made format progress percent indicator working. 
  
Revision r100 (valerius, Sun, 22 Mar 2015):   

Made ufat32.dll (FORMAT) reformat-friendly. Now fat, fat32, hpfs, jfs could be reformatted from each one to each other. 
  
Revision r99 (valerius, Fri, 27 Feb 2015):   

A minor fix of Fat32Format for Win32 case. 
  
Revision r98 (valerius, Fri, 27 Apr 2015):   

Updated ufat32.dll fo Fat32Format 1.07. Eliminated some minor bugs. The bug with kernel trap when formatting the fat32 partition when booted from another fat32 partition. 
  
Revision r97 (valerius, Wed, 30 Apr 2014):   

Initial branch 0.10 commit. Now added the FORMAT routine (adopted Fat32format from Win32). It is 32-bit. Also, CHKDSK routine made 32-bit, plus small 16-bit wrappers for calling from usual frontends, like chkdsk.exe/format.exe. Added fixes to the IFS needed to support (re-)formatting to/from FAT32. Also, from now, all parts can be compiled by OpenWatcom wcc[386] and wasm. 
  
Revision r96 (komh, Sun, 14 Dec 2008):   

Fix a non-sector IO problem on a smaller volume than 2GB. 
  
Revision r95 (komh, Sun, 14 Dec 2008):   

Fix a non-sector IO problem on a smaller volume than 2GB. 
  
Revision r94 (komh, Sun, 14 Dec 2008):   

Convert a size from in bytes to in sectors when user request sector io on a less volume than 2GB. 
  
Revision r93 (komh, Sun, 14 Dec 2008):   

Convert a size from in bytes to in sectors when user request sector io on a less volume than 2GB. 
  
Revision r92 (komh, Sun, 14 Dec 2008):   

Support OPEN_FLAGS_DASD correctly on the devices larger than 2GB using sector IO like HPFS. 
  
Revision r91 (komh, Sat, 13 Dec 2008):   

Support OPEN_FLAGS_DASD correctly on the devices larger than 2GB using sector IO like HPFS. 
  
-----
Version 0.9.13

Fixed the problem that a program trying to READ/WRITE from/to memory object
 with OBJ_ANY attribute is crashed. With fix, READ/WRITE performance is decreased.
Fixed the problem that CACHEF32.EXE prints 'Unicode translate table for xxx
 loaded' even though '/S' is specified.
Clarified that messages of CACHEF32.EXE are related to FAT32.
Improved lazy-write performance.

-----
Version 0.9.12:

Fixed the problem that CACHEF32 is crashed after calling CHKDSK for dirty
 volume.
Fixed the problem the regonition of USB removable media takes very long time
 when inserting it since 0.9.11.
 This is because FAT32 always calculates free space on mount. Now, FAT32
 calculates free space only if /CALCFREE specified or free space info was not
 stored on disk.
Fixed the trap when removing USB removable media without eject.
Improved Read/Write performance. By Lars.

*** Known Problems ***

When using USB removable media with other OS such as Windows, free space can
 be incorrect. At this time, you should use 'chkdsk' to correct it or
 '/CALCFREE' to avoid it.

VERSION 0.9.11

Fixed non-recognition problem of USB removable drive change.
Fixed "free space" problem.
Fixed some minor warnings such as "non used variable" on compilation.

Known Problem: Somtimes the pending flush state of a few sectors is not cleared.
You can see this by report of CACHEF32.  Even though any dirty sector is not there, pending sector
exist. However, this has no effect on the functionality of IFS.

Version 0.9.10:

Ejection of removable media caused a dirty flag on removable drive. Fixed.
Problem of driver trying to read from marked bad sectors on drives. Fixed
Trap with RM. Fixed
Changed version numbering style to major.minor.patch level style.
Removed beta symbol.
Filename including NLS characters not converted to unicode by OS/2,
Caused 'lost cluster' problem. fixed.
Added IOCTL function to write in sector mode.

Version 0.99:

CACHEF32.EXE caused a continuously beep if a copy of CACHEF32.EXE was already
loaded and the current CP was different from a copy of FAT32 IFS. Fixed.
Case conversion of national characters worked only for ASCII below 128.
Introduced in version 0.98b. Fixed.
Sometimes copies of the FATs did not match each other or 'lost cluster'
occurred after copy operation with cache enabled. Fixed (maybe workaround ?).
Unfortunately, cache performance is decreased as a result.
Replaced legacy DBCS APIs with ULS APIs.
Added /H option to FAT32.IFS to allocate cache memory in high memory (>16MB).
This should take care of the 'linalloc' problem.
Added /F option to CACHEF32.EXE to force CACHEF32.EXE to be loaded without
any FAT32 partition. Hopefully, this option can help people who use removable
media formatted FAT32.
Added a feature to clear fForceLoad flag to '/N' option of CACHEF32.EXE.
FAT32.IFS process parameters are no longer case sensitive.

Version 0.98:

Fixed TranslateName() to support FAT32 variation of WinNT family.
Fixed FS_PATHINFO to support level 7 correctly.
Both /FS and /FL option are not supported any more.
Added 'Directory Circularity Check' for FS_COPY and FS_MOVE in case of mixed
path of short and long name.
Added /CP option to CACHEF32.EXE to specify codepage in paramter.

Version 0.97:

The partition support packages, PARTFILT.FLT and OS2DASD.F32, for non-LVM
systems have been removed from the FAT32.IFS driver package.
Renamed the following files to:
-F32MON.EXE   (formerly MONITOR.EXE)
-F32PARTS.EXE (formerly DISKINFO.EXE)
Why? By renaming these files, you will know they are all part of the FAT32
distribution, AND you see them all grouped no matter what you use to browse your system.
The FAT32.INF file has been revised with a different format and more information.
There was error in the shutdown routine of FAT32 main source which was unintentionally
added when DBCS support was added. Fixed.
The possibility existed that files created by any system of the WinNT family such as
Win2X and WinX could be recognized as having Extended Attributes by the FAT32 driver. Fixed.
Changed EA mark byte for compatibility with WinNT family.
Driver now supports 8.3 names whose name and ext part are all lower case and created
by WinNT family.

IMPORTANT:  Starting with version 0.97, CHKDSK /F must first be run on each FAT32
partition before adding EA support to the FAT32 IFS driver. This step is required
starting with this version due to the EA mark byte being changed for compatibility
with the WinNT family.

Version 0.96:

Changed the maximum value of RASECTORS from sectors per cluster times 4 to 128.
Fixed TRAP on accessing FAT32 partition having 32k cluster.
Now FAT32.IFS does not mount FAT32 partition having >32k cluster.
The DBCS [0xHH5C] code and [1 byte-katakana] was not changed correctly. The 1st
byte code of DBCS contained in SBCS caused the conversion which is not
right. Fixed. (Previously undocumented).

Version 0.95:

FAT32.IFS now supports DBCS, especially Korean, correctly.
Fixed 'unsigned' overflow problems.
When both /FS and /EAS are enabled, MOVE and REN command don't process EA files
correctly. Fixed.
When /FL(default) is enabled, FillDirEntry doesn't recognize 8.3 name pointing
to the same file as long name.
When /EAS is disabled, FAT32.IFS now pass empty EA.
Changed UFAT32 to find volume labelFAT32 in ROOT directory not in bootsector.
Changed UFAT32 to report 'file allocation error' as long name.
Added FSCTL function to get short name from long name.
When /FS is enabled and a target file already exists, COPY and MOVE command names
a target file to the short name of the existing file. Fixed.
Fixed bug of 'Dest check routine' in FS_COPY.
Fixed a potential problem in FS_MOVE.
Fixed a problem of CACHEF32.EXE with restarting lazy write deamon after quiting
it on CMD.EXE.
Added /Y to assume 'Yes' for CACHEF32.EXE
Added /S to prevent CACHEF32.EXE from displaying normal messages.

Version 0.94:

Fixed a problem CHKDSK had when finding bad sectors.
Fixed a problem when running in 'Internal Shortname mode' that long files were
not found.

Version 0.93:

Modified the way CHKDSK detected a bad cluster.
When the disk was dirty, CHKDSK was unable to rename a lost EA file to a proper
file. This has been fixed.
FAT32.IFS now sets the archive attribute. It didn't before.
Messed about a bit with the cache and lazy write handling.
Rewrote UFAT32.DLL to utilize a IOCtl call to read sectors

Version 0.92:

When a FAT32 volume was not shut down properly the IFS did not allow files to be opened.
This caused device drivers etc during shutdown not being loaded from a FAT32 volume. Now
FAT32.IFS allows files to be read from a dirty volume.
When a directory was moved the .. entry in that directory was not updated to point to
the proper parent directory. This has been corrected.
CHKDSK checked for extended attributes even when /EAS was not specified after the IFS
line in the config.sys.
CHKDSK contained an error that when checking subdirectories sometimes (rare) the incorrect
name (the longname of the previous directory entry) was used. This lead to claimed missing
extended attributes for non-existing files.
(the longname of the previous directory entry) was used. This lead to claimed missing
extended attributes for non-existing files.
Modified the output of CHKDSK somewhat. Also, when the output is redirected to a
file, the progress percentages are suppressed.

Version 0.91:

Got a report that FAT32.IFS ignored the fourth character of the extention. Looking for
the cause I found that FAT32.IFS created incorrect short name equivalents for files with
a four character long extention. In that specific case the fourth character was ignored
when creating the shortname. The effect was that e.g. a file called file.1234 and file.1235
ended up having the same shortname. FAT32.IFS now no longer exhibits this behaviour, but
you still might have double shortnames in the same directory on your disk. I don't think
SCANDISK detects this problem. Please note this could only have happened with files having
an extention of four chars for which all chars except the fourth extention char were equal.
To check this, set FAT32.IFS to use short names internally (CACHEF32 /FS), and in a DOS
session do a DIR command. If you detect any duplicate names, switch back to an OS/2 session
and rename one of these files to another name and then rename it back to the original name.
do a DIR command. If you detect any duplicate names, switch back to an OS/2 session and
rename one of these files to another name and then rename it back to the original name.
Modified the calling of the strategy2 calls. Now FAT32.IFS no longer request confirmation
per individual sector. This fixes the problems with AURORA. The problem with AURORA (Warp
Server for eBusiness) FAT32.IFS was experiencing was caused by a bug in the Logical Volume
Manager that did not properly confirm individual requests. Since FAT32.IFS now no longer
depends on this individual confirmation the bug is no longer relevant. BM did confirm this
bug to me (October 1999) and promissed it would be solved in the next fixpack.
Introduced a separate thread (from CACHEF32.EXE) that runs at time critical priority.
The thread is awakened whenever the cache runs full with dirty sectors and takes care of
flushing these dirty sectors.
Corrected a problem with Extended Attributes when a file had very large extended attributes
(almost 65536 bytes) the system would trap.
Corrected a problem when a sector towards the end of the disk was read. Due to the
read-ahead function 1 sector too far was read and the read failed.
Noticed that the diskspace under DOS was not correctly returned. The fake clustersize was
too small to actually report the correct disksize for disks smaller then 2.1 Gb.
Until this version, the strategy2 routines did not set the flag to request the disk
controller to cache the request on the outboard controller. I did not set this flag
since it didn't seem to matter on my own machine. However, this version has the flag
set since some of you might profit from this setting and experience better performance.
Enlarged maximum amount of data that is flushed (when lazy writing is used) to 64 Kb.
Hopefully, this will increase performance for those disk controllers that do not have
the on-board cache enabled.
Did an effort to solve the problem when a cluster chain becomes improperly terminated.
FAT32.IFS simply ignores the problem now and assumes end of file. CHKDSK (UFAT32.DLL)
detects and corrects this problem.

Version 0.90:

Found some problems with FS_COPY. If FS_COPY was copying a file the target file was
not protected from being deleted or renamed in another session.
Noticed that I had the default cache size incorrectly set to 128 Kb.
Modified it to 1024 kb and added a warning message if no /CACHE argument is present.
FS_COPY didn't check if source and target where on the same partition. (I incorrectly
assumed OS/2 did this check.). Now FS_COPY doesn't try to handle the copy when source
and target are on different drives. This way the copy is done by OS/2 itself.
Modified the way data is written from the cache to disk. Instead of instructing the
Device Driver to write data directly from cache to disk, the data is now first copied
to another memory area thereby releasing the data in the cache a lot sooner. This way
the IFS does not have to wait for the device driver to finish before a specific sector
in cache is  available again. The drawback is that this makes FAT32.IFS to use more
(physical) memory. With a cache size of 2048 Kb, an additional 480 Kb is allocated.
With smaller cache sizes the additional data reduces relatively. (a cache size of
1024 Kb leads to an additional memory allocation of 240 Kb)
Never had any error handling (message) in the routine that is called by the device
driver to notify completion of the strategy2 request list. This version has it. This
is mainly to get more light on FAT32.IFS and aurora.

Version 0.89:

FS_SHUTDOWN is called twice by the kernel. The first one is to signal begin of
shutdown and the second to signal the end. FAT32.IFS flushed its internal buffers
on the 2nd call. This has been modified so FAT32.IFS now flushes on the first call.
second to signal the end. FAT32.IFS flushed its internal buffers on the 2nd call.
This has been modified so FAT32.IFS now flushes on the first call.
I've had a report from someone with a problem where the drives where mounted after
CACHEF32 had queried CACHE settings. Since the cache is allocated on first mount
this didn't work. I have added a call to force the drives to be mounted before
CACHEF32 queries the cache settings.
Fixed a small division by zero in CACHEF32 when the cache was zero sectors large.
Fixed the 'cannot find message file' problem in CACHEF32.EXE.
Some users keep having troubles with 'error cannot find SH". Just for myself added
the filename there.
Replaced an internal call (FSH_PROBEBUF) by a DevHelp call.
Fixed a trap I got due to a reentrancy problem in my memory allocation routines.
Changed the way data is kept per open file instance because I have received some
reports from users that they got a 'ERROR: Cannot find the IO!" message.
FAT32.IFS had its code segments marked as EXECUTEONLY. Now AURORA doesn't seem to
like that and traps. The code segments are no longer marked this way but as
EXECUTEREAD.

Version 0.88:

DISKINFO still didn't show partitions inside an extended partition type F.
Fixed a potential problem in the lazy write routines. This could lead to sectors
not being written when they should have. (have never seen it though)
Made it work with Fixpack 10. (FP10 made FAT32.IFS trap)

Version 0.87:

Modified the internal memory usage somewhat. Some allocated segments are marked
unswappable now.
Modified FS_DELETE to return ERROR_ACCESS_DENIED whenever this call was used
for a directory. Previously, FAT32.IFS return ERROR_FILE_NOT_FOUND.
Modified CACHEF32.EXE so it will also run if UCONV.DLL cannot be loaded. If that
is the case, no UNICODE translate table will be loaded.
Solved a problem when a file was rename when on the case mapping was changed.
If the file had extended attributes the rename failed and the EA was lost.

Version 0.86:

Always thought that it was not allowed to the directory bit set in DosSetPathInfo
and therefor I rejected calls with this bit set. I was wrong. Now DosSetPathInfo
accepts the directory bit set (for directories only).
AModified partfilt so it will also scan partitions inside a extended type F
partition (partfilt is now on version 1.08). Modified DISKINFO.EXE to do the same.
A Noticed some problems when a file was opened multiple times. The directory
information was not always updated properly. Also, the attribute of a open file
was kept per instance instead of only one time for all open instances of a file.
So using DosSetFileInfo on one instance was not noticed by other instances of a
file.

Version 0.85:

A user pointed me at the problem that ReadOnly files cannot be renamed.
This problem has been corrected.
Corrected a problem whenever a non-existing file was opened. If later the file
was created this could lead to a trap (at least in theory: I haven't seen it nor
heard it actually occured)..
Changed PARTFILT again. Whenever a hidden partition type was specified partfilt
also virtualized the unhidden type. So if /P 16 was specified, both types 16 and
6 were virtualized. This could lead to unwanted results.

So I modified the mechanism again. Now - if /A is not used - only the types
specified after /P are virtualized. (The /A switch controls whether or not to
virtualize all partitions.)

PARTFILT always unhides the partitions it virtualizes.

For the partition types PARTFILT virtualizes the following rules apply:

Normal partition types (types 1, 4, 6, 7, but also 11, 14, 16 and 17) are
reported to OS/2 with their actual -unhidden- partition type.

Any other partition types specified after /P are reported as un-hidden IFS
partitions. Any other partition types NOT specified after /P are reported
as their actual -unhidden- type.

Keep in mind that if you specify /A you must also use the /M argument to tell
PARTFILT which partitions you want to mount.
Also, whenever /A is specified with PARTFILT /W is automatically set. Otherwise,
OS/2 will not boot at all.
CACHEF32.EXE did not properly handle the /P:x argument when specified in
CONFIG.SYS. The argument was lost. This has been fixed.

Version 0.84:

Got a message from someone complaining that the change in PARTFILT made
him loose the ability to mount hidden 'normal' partitions since PARTFILT
presented all partition types as IFS. Now PARTFILT show normal partitions
by their actual types and only not-by-OS/2 supported types as IFS partitions.
to mount hidden 'normal' partitions since PARTFILT presented all partition
types as IFS. Now PARTFILT show normal partitions by their actual types and
only not-by-OS/2 supported types as IFS partitions.
Increased performance for accessing large files by keeping track of first
and last cluster for each open file, and even the current cluster for each
open instance.
Removed the limit for the maximum number of open files.
Fixed a problem in my internal memory (sub)allocation routines that lead
to various problems. This became more clear since FS_OPEN now also uses
malloc to allocated memory per open file. Problems I encountered were
trap D's and internal fatal messages.
Changed the way MONITOR works. Introduced a 'trace mask'. See MONITOR above.

Version 0:83:

Replaced the translate mechanisme that was introduced in version 0.75
by a mechanisme where CACHEF32.EXE on first load calls the native OS/2
NLS support to create a default translate table between the current
codepage brand unicode. This should work better for some NLS versions
of OS/2.
Added a switch to CACHEF32 to dynamically change the priority of the
lazy write thread. The default priority is still idle-time, but this
can be changed to a higher priority.
Did experiment a bit with lazy writing in general. In my own system
it improved performance somewhat.
Corrected a problem in PARTFILT where whenever a HIDDEN partition type
was specified after /P this didn't always work properly. Now when a
hidden partition type is specified, the unhidden type is also handled
by PARTFILT.

Version 0.82:

Changed a bit in the algoritm for making a short name for a file with
a longname (again). Now filenames starting with a dot are handled better.
Changed the (internal) memory handling routines to use more then one
selector so I could use this for FindFirst/Next handling instead of
allocation one selector per FindFirst/Next call. This was neccessary
because a DOS session can fire a lot of FindFirst calls only for
checking existence of files. Before the modification FAT32.IFS could
run out of memory after say a couple of hundred FindFirst calls.
(I found that OS/2 itself doesn't allow a DOS session to fire more
than around 500 FindFirsts. After that OS/2 starts reusing find handles.)
I encountered this problem when trying to unarj the Novell Netware client
2.12 on my FAT32 disk.

Version 0.81:

Noticed that when FS_FILEINFO was used to set the date/time on a file
as only action the date/time was not updated. Corrected.
In version 0.66 I removed the setting of the attribute using DosSetFileInfo.
As I found out, I was wrong. Now DosSetFileInfo from 32 bits programs sets
the attribute. From 16 bits programs however, this doesn't seem to work on
FAT, HPFS and FAT32. Don't know why.

Version 0.80:

Rewrote the strategy2 routines so more than one request list can be fired
per volume. Hope this improves performance.
Corrected a problem with FS_COPY that failed if the target file was zero
bytes large.
Corrected a problem with DosOpen with the Truncate flag set and when the
target file already existed and had EAs. The open failed, but the file was
truncated and a lost cluster was created.
Created PARTFILT.TXT file about PARTFILT and DISKINFO.
Implemented an version check between the IFS and UFAT32.DLL (for CHKDSK)
and CACHEF32.EXE.

Version 0.79:

Rewrote the emergency flush routine so it will handle multiple FAT32
partitions better.
Made some minor modifications in UFAT32.DLL (For CHKDSK).
A trap was solved when an EA file could not be repaired
An error in the longname retrieval routine was fixed
Output is matched more closely to HPFS and plain FAT.

Version 0.78:

Corrected a TRAP that could occur when the cache is full with dirty sectors
and the oldest dirty single sector was flushed using a single flush routine.
The trap message was 'WriteCacheSector: VOLINFO not found!'. This problem
only occured when more than 1 FAT32 partition is present.
Corrected a problem with UFAT32.DLL when checking directories containing
more than 2048 files. (CHKDSK reported lost clusters, but was wrong)
Corrected another problem with UFAT32.DLL that occured when there is not
enough memory available to check large directories. UFAT32 would abend
with an access violation.
Corrected a problem with DosOpen when on Opening an existing file with only
the FILE_CREATE (OPEN_ACTION_CREATE_IF_NEW) bit set (and not the FILE_OPEN flag)
the file was created while the open should fail.
Corrected a problem that the characterset translate tables would be
overwritten internally leading to all kinds of funny results.
(Duplicate directories etc)
Modified the default behaviour of FAT32.IFS and for the /T option for
CACHEF32: No character translation takes place. This works for situations
where Windows and OS/2 use the same codepage.

Version 0.77:

Corrected a problem when more than 512 lost chains were found.
(CHKDSK can only recover 512 lost chains at one run)
Corrected a problem in OS/2 sessions (introduced in version 0.75)
where valid 8.3 filenames in lowercase where always stored in uppercase.

Version 0.76:

Corrected a NASTY BUG that lead to loss of data when multiple files were opened.

Version 0.75:

Added a check for valid EA names.
Added a translation mechanism for long filenames between the Windows Character
set and OS/2 character set. See: WINDOWS ^ OS/2 CHARACTER SETS for more
information.

Version 0.74:

Corrected a problem with DosFindFirst/next when the buffer wasn't large
enough for the extended attributes and FAT32.IFS returned ERROR_EAS_DIDNT_FIT
when more than one entry was placed in the resultbuffer. Now FAT32.IFS returns
this error only if the EA's of the first matching entry don't fit in the buffer.
(This error lead to the WPS giving an error that no matching entries were found
on opening of a directory)

Version 0.73:

Using DosSetPathInfo, it was possible to create an EA file for a non
existing file. This lead f.i. to a ' EA. SF' file in the root directory.
This problem has been corrected.
Changed a bit in the algoritm for making a short name for a file with
a longname.

Version 0.72:

Forgot build in the EA logic for creating and removing directories. Has
been added.

Version 0.71:

EA's were not found from DOS sessions. Now this is hardly a problem since
DOS programs never access EA's, but EAUTIL can be used in DOS sessions,
and didn't work. Now it does.
There was another problems with finding EAs when FAT32.IFS was set to
the mode in which internally short names were used (CACHEF32 /FS). Now
this seems to work properly.

Version 0.70:

Most significant change is the implementation of EXTENDED ATTRIBUTES.
Currently they will only be supported if /EAS is specified after FAT32.IFS
in the config.sys. Please read the chapter about extended attributes.
be supported if /EAS is specified after FAT32.IFS in the config.sys. Please
read the chapter about extended attributes.
Corrected a small problem where a whenever a short name had to be created
for a longer name containing any embedded blanks in the name FAT32.IFS left
the blanks in, while Win95 skips them while creating the shortname. This lead
to SCANDISK reporting incorrect long file names. (When correcting this problem
the short name was modified by SCANDISK.) Now FAT32.IFS does the same as
Windows 95.
Received a report that FAT32.IFS failed allocating the cache space. Modified
FAT32.IFS so it will no longer trap on such a situation, but will continue to
run (without a cache - slow!)
Received a report about a possible memory leakage problem in FAT32.IFS.
Changed CACHEF32.EXE so when run, it will show the number of GDT selectors
currently allocated for FAT32.IFS.

Version 0.66:

DosSetFileInfo returned an error (ERROR_INVALID_LEVEL) when trying to write
Extended attributes. Now FAT32.IFS reports NO_ERROR (But still doesn't write
the EA!). This makes f.i. that the installation of the OS/2 Netscape
pluginpack now works properly.
Corrected a problem with FindFirst/Next where the check on required buffer
space was incorrect. Some programs (Slick Edit) failed doing a directory scan.
This has been fixed.
 Modified the behaviour of DosSetFileInfo so that it will only set date/time
values in the directory. Before DosSetFileInfo also set the attribute, but I
found that this also doesn't work on HPFS, so I modified the behaviour.
Modified the default MONITOR logging so that (almost) all FS_XXXX calls are
shown with the return values given.

Version 0.65:

Files with valid 8.3 lowercase filenames where returned by findfirst/next
in DOS sessions in lowercase as well. Some programs don't like that. Now
findfirst/next in DOS sessions always returns an uppercase name. (This
problem only occured when LFN's were hidden to DOS.)
Corrected a problem where while filling the buffer for FindFirst/Next too much
data was initialized (due to using strncpy) and data was overwritten. This was
most appearant with OS/2 Commander that trapped on a FAT32 directory with
many files.

Version 0.64:

Again a problem with CHKDSK, this time the file allocation check failed if
there were more than 65535 clusters assigned to a file.
FAT32.IFS now reports fake cluster sizes and total and free cluster counts
whenever a DOS session queries free space. The maximum cluster size returned
has been set to 32 Kb and the maximum for total and free clusters is 65526
clusters so the maximum disk size in dos is reported as almost 2Gb.
Encountered (and fixed) a trap that occured whenever a volume was flushed
via a explicit call and there were still dirty sectors in call. It occured
in code I changed in version 0.60 and this was the first time I trapped on
it, so the combination of factors appears unlikely.
Modified FS_CHGFILEPTR so negative seeks will be handled properly and
build in logic to not allow files to grow bigger then 2Gb.
Uptil now I ignored the MUST_HAVE_XXX settings for directory scans since
I assumed they were not used. Some users reported files beeing show twice
in some application so: I stand corrected and so is FAT32.IFS.
Corrected a potential problem where (theoretically) files could be given
a directory attribute.
Changed the algorythm used when no large enough contiguous FAT chain is
available and the FAT chain has to be constructed from various chains. Before
the change an algoritme searching for individual free clusters was used. Now
FAT32.IFS searches the largest free chain assigns it and then searches for
the next largest free chain until a chain long enough is created. This is
still not very fast, but will only really occur if the disk is rather
full and very fragmented.

Version 0.63:

Finally understood why CHKDSK failed on very large disks. UFAT32.DLL accesses
the disk using DosOpen with OPEN_FLAGS_DASD. In that mode default behaviour is
that the disk is accessed using physical byte offsets from the beginning of the
(logical) disk. Now since the maximum value in a 32 bit integer is 2^32 this
value divided by 512 was the maximum sector that could be read (= sector
8388608 = 4Gb disk size maximum). Now UFAT32 uses the same trick as HPFS uses,
via a call to DosFSCtl disk access is switched to sector mode so 2^32 sectors can
be accessed. This means CHKDSK can (theoretically) check disks upto 2048 gigabytes.

Version 0.62:

Corrected a bug that lead to a disk full message when a file was rewritten
(for instance with E.EXE) and the new size was just a couple of bytes more
then to old size. Problem was result of the logic change in FS_NEWSIZE.
Oops: Forgot to update the version number in version 0.61.

Version 0.61:

Changed some logic in the dirty buffer flush mechanism.
Changed some logic in the FS_WRITE and FS_NEWSIZE functions.

Version 0.52

Didn't handle closes from child processes that inherited open files
properly so the final close would fail.

Version 0.60:
- Changed the algoritm to detect EOF in the FATs since MS appearantly uses
  other values than 0x0FFFFFF8 as EOF token.
- Changed the flush dirty buffer mechanism to use strategy2 device calls.
  This has resulted in an increase of performance during write to disk.
- Changed CHKDSK to accept an /V:1 argument to only show fragmented files,
  while /V[:2] also lists all files.
- Made it possible that renaming a file to a new name where only the
  case was changed worked.

Version 0.51

Did a lot of work on Lazy write performance. Cache access is no longer
protected with a semaphore but with a per sector inuse flag.
Fixed a problem that caused INSTALL and MINSTALL to abort when FAT32.IFS
was loaded. The problem had to do with argument checking with FS_IOCTL calls.
Fixed a problem that BRIEF, a populair editor under OS/2, trapped or hung
itself. The problem had to do with returning improperly formatted nformation
when querying EAs (FAT32.IFS does not support EAs!)
Corrected a serious problem when a single file was opened more than once
and the file was modified using one of the instances. The other instance(s)
didn't pick up the changes and FAT32.IFS might trap.

Version 0.50

Fixed a problem where files with longnames could sometimes not be found
which lead to duplicate filenames.
Fixed a problem where SCANDISK would claim that a directory created by
FAT32.IFS contained invalid blocks..
Fixed a (BIG) problem with files or directories with long names where
if such a file was opened in a DOS session and in an OS/2 session
simultaniously OS/2 was unable to see that the same file was opened.
Fixed a problem where read-only executables could not be run.
 Fixed a problem where the algoritm used to determine the highest
available cluster number was incorrect.
Fixed a problem were CHKDSK was unable to fix cross-linked files.
Since some people complained that FAT32 would sometimes hang, I have
modified the internal semaphore mechanism so an error message will
appear if a semaphore remains blocked for more than a minute.

Version 0.41

Fixed a problem with numeric tails shortnames. Files always got ~1 instead
if an incrementing number. Has been fixed.

Version 0.40

The volume label was retrieved from the boot sector. However Win95 actually
stores the Volume label in the root directory. The Volume label now is taken
from the root directory. Also, the label can be set now. (The boot sector is
however still updated)
/Q switch of PARTFILT didn't work. Now it does.
A problem was in CHGFILEPOINTER that could (theoretically) lead to an trap
(FAT32: FS_WRITE: No next cluster available").
Corrected a logical error where renaming a file or directory to an existing
directory caused the file or directory to be moved into the target directory.
Now FAT32.IFS returns an error.
Changed CHKDSK so that if an error is found in one of the FATs CHKDSK continues,
but ignores the /F switch. Previously, CHKDSK would not do any additional checks.
Renaming a file or directory from the workplace shell didn't work because of
two problems:
 The WPS uses a strange algoritm to determine if the IFS supported long file
names which appearantly failed with FAT32. This has been corrected.
FAT32.IFS does not support EA's (yet), the WPS renames a file, tries to write
EAs and since that fails renames the file back again. Now FAT32 returns NO_ERROR
on the call used to write EAs.
CHKDSK now is able to fix cross-linked clusters on the disk.

Version 0.30

Added PARTFILT.FLT to the archive.
Added support for ReadOnly partitions. This is needed for PARTFILT.
IOCTL Calls (category 8) are now passed throught to OS2DASD.

Version 0.20

Cache routines have been improved for performance. Removing 'old' sectors
from the cache is no longer needed. /T option for CACHEF32 has been removed.
CHKDSK: Is now able to fix incorrect free space count.
CHKDSK: Lost cluster fix algoritm has been improved for performance.
CHKDSK: Didn't recoqnize bad-sectors, has been fixed.
CHKDSK: Had problems with recoqnition of some type of free clusters,
has been fixed.
OS2DASD.DMD: Is now based on the latest version. (December '97)

Version 0.10  - Initial Version


=============
LATEST FILES:
=============

Latest Compiled Version:
--------------------

Latest Compiled Version:   

FAT32 IFS: ftp://ftp.netlabs.org/pub/FAT32   

FAT32.IFS Netlabs project page: http://trac.netlabs.org/fat32/   

Builds archive: ftp://osfree.org/upload/fat32/   

Contact:
-------

Adrian Gschwend at ktk@netlabs.org if you have some FAT32 patches, or you can
join the #netlabs channel at irc.freenode.net (FreeNode IRC). My nick is ktk, Brian Smith is
nuke.

KO Myung-Hun at komh@chollian.net concerning issues dealing the FAT32 code

Alfredo Fernndez Daz at alfredo@netropolis-si.com concerning issues dealing
with the WarpIN script and FAT32 code

David Graser at dwgras@swbell.net concerning issues with the FAT32.INF file

Valery V. Sedletski at _valerius@mail.ru concerning issues with the FAT32 .IFS version 0.10.

==============================================
BUILDING FAT32 FROM SOURCES (DEVELOPERS ONLY):
==============================================

REQUIREMENTS:
-------------

the IFS DDK Build Environment
IBM VAC 3
OS/2 Toolkit 4.5 (included with OS/2 ACP/MCPs and eCS)
IBM DDK sources and tools (freely available at IBM's DDK site)
IBM C
the System utilities (including link.exe)

REQUIREMENTS for version 0.10:   
------------------------------

OpenWatcom (version 1.9 is ok)
OS/2 Toolkit 4.5 (included with OS/2 ACP/MCP and eCS).
Awk interpreter for converting Watcom map files to VAC map files   
FAT32 source code. 

Note:  Although IBM DDK souces and tools are free, you will have to register at
the IBM DDK site if you have not already done so.


SOURCE CODE:
------------

http://svn.netlabs.org/fat32

The sourcecode is released under the GNU LGPL.


COMPILING:
----------

To get a build going, you'll need several things;

You should have VisualAge installed and it's environment variables set.  Then
set these 3 variables:
SET DDK=d:\ddk
SET DDKTOOLS=d:\ddktools
SET IBMC=d:\ibmc

Correct the paths as neccessary.

Then run the make.cmd script, and if all goes well you should have a fresh build
of FAT32.IFS.

Note:  There are many warning when compiling FAT32. Most of them are
'optimizing' warnings or 'unreference variable' warnings. These warnings can be
ignored.

COMPILING version 0.10:   
-----------------------

To get a build going, you'll need several things;   

You should have Watcom C installed and it's environment variables set. You'll need to take the buildw.cmd file 
in the sources root directory and modify the following environment variables.   

set WATCOM=f:\dev\watcom 
set TOOLKIT=f:\os2tk45 
  
Correct the paths as necessary. Buildw.cmd also calls %watcom%\owsetenv.cmd. This file must exist and contain 
the usual Watcom environment, like this:   

SET PATH=f:\dev\watcom\BINW;%PATH% 
SET PATH=f:\dev\watcom\BINP;%PATH% 
SET BEGINLIBPATH=f:\dev\watcom\binp\dll 
SET INCLUDE=f:\dev\watcom\H\OS2;%INCLUDE% 
SET INCLUDE=f:\dev\watcom\H;%INCLUDE% 
SET WATCOM=f:\dev\watcom 
SET EDPATH=f:\dev\watcom\EDDAT 
SET WIPFC=f:\dev\watcom\WIPFC 
  
Then run the _wcc.cmd script, and if all goes well you should have a fresh build of FAT32.IFS. There are also 
buildi.cmd for ICC and buildm.cmd for MSC in the root directory. They are called by _icc.cmd or _msc.cmd in each 
subdir. So, to build sources in each subdir, you need just tap Enter on _wcc.cmd/_msc.cmd/_icc.cmd.   

Also note that for creating *.sym files for fat32 binaries, you'll need the awk interpreter (awk.exe). You can 
use GNU awk (GAWK) for that. To install it, use   

yum install gawk   

to install it from yum/rpm repository. The binary is called gawk.exe, so you may need to create a symlink 
gawk.exe -> awk.exe. For creating the *.sym file, the Watcom map file (*.wmp) is taken. Then it gets converted 
to a VAC map file (*.map) by mapsym.awk AWK script. And finally, mapsym.exe from OS/2 Toolkit is used to convert 
*.map to *.sym.   

Note that all you need for compiling the sources is Watcom installation. DDK is not needed as all needed headers 
are present in the sources. The only external things needed are awk.exe from yum repo and mapsym.exe from OS/2 
Toolkit.   


===========
FOOTNOTES:
===========

Footnote
-------

CACHEF32.EXE Command:  /D: Parameter

Sets the amount of time (in milliseconds) that a disk must be idle before it can
accept data from cache memory. The minimum amount of disk idle time must be
greater than the value specified in the BUFFERIDLE parameter.

To set the amount of disk idle time to 2000 milliseconds, type the following in
the CONFIG.SYS file:

CALL=X:\TOOLS\SYSTEM\BIN\CACHEF32.EXE /D:2000


Footnote
-------

CACHEF32.EXE Command:  /B: Parameter

Sets the amount of time (in milliseconds) that the cache buffer can be idle
before the data it contains must be written to a disk.

To set the amount of cache buffer idle time to 1000 milliseconds, type the
following in the CONFIG.SYS file:

CALL=X:\TOOLS\SYSTEM\BIN\CACHEF32.EXE /B:1000


Footnote
-------

CACHEF32.EXE Command:   /M: Parameter

Specifies the maximum amount of time (in milliseconds) before frequently written
data is transferred to the disk.

To have frequently written data that has been in cache memory longer than 4000
milliseconds written to disk, type the following in the CONFIG.SYS file:

CALL=X:\TOOLS\SYSTEM\BIN\CACHEF32.EXE /M:4000


Footnote
-------

CACHEF32.EXE Command:  /L: Parameter

Specifies whether the contents of cache memory are written immediately to disk
or only during disk idle time. This command pertains only to disks formatted for
the FAT32 File System. ON enables writing of cache memory during disk idle time.
OFF specifies immediate writing to disk. The default state is for lazy-writing
to be ON.  If you want lazy-writing to be OFF as the default, you must add the
following statement to your CONFIG.SYS file:

CALL=X:\TOOLS\SYSTEM\BIN\CACHEF32.EXE /L:OFF


Footnote
-------

Example:  Setup using jCVS (Java CVS Client)

http://www.jcvs.org/download/jcvs/jcvsii-5.3.2.zip

Under "Checkout" Tab:

Selections
User Added Info

Server
PServer

User Name
guest

Password
readonly

CVS Module:         .

Note:  That is a dot.

CVS Server:         www.netlabs.org

CVS Repository:         /netlabs.cvs/fat32

Checkout Directory:     X:\temp

Note:  X is the drive where you temporary directory is located

Arguments:

Note:  Arguments can be left blank.


Footnote
-------

License.txt

This sourcecode was/is originaly written by Henk Kelder <henk.kelder@cgey.nl>

Henk Kelder gave the copyright of the sourcecode to netlabs.org in

January 2002. Because of the amount of work he spent on this sourcecode,

he preferred to have a license that makes sure that no company or individual

can make profit from it. Because of this, we release the sourcecode under the

GNU LESSER GENERAL PUBLIC LICENSE (LGPL).


The original license is online at http://www.gnu.org/copyleft/lesser.txt

More information about GNU Software can be found at http://www.gnu.org

6. January 2002

Adrian Gschwend <ktk@netlabs.org>

http://www.netlabs.org


Addition from 12. March 2018:

There are some code we borrowed from other projects,
which have their respective licenses (GPL-compatible):

1) FORMAT is based on Fat32Format, (c) Tom Thornhill,
licensed as GPL (no strict version),
http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm;

2) QEMUIMG.DLL is based on QEMU code, (c) Fabrice Bellard and 
contributors, licensed as GPL, version 2 (not higher),
http://www.qemu.org

3) PARTFILT.FLT is (c) Deon van der Westhuysen, 1995; 
licensed as GPL, version 2, or any later version (at your option)

4) zlib is (c) Mark Adler, Jean-loup Gailly, licensed as a 
3-clause BSD license (see zlib.h)

Valery V. Sedletski <_valerius@mail.ru>

http://osfree.org
