 This package contains an updated version of the fdpatches which were
originally made by Heiko Schroeder. Moreover, I have added some new
features.
 This updated version is for linux patch level 15.
 For a description what this package actually does, see the original
README file by Heiko Schroeder (README.schroeder).

I. New features:
================
 1. The new FDSETMAXERRS ioctl sets the number of errors permitted
before the floppy drive aborts the operation, and the number of errors
permitted before the floppy drive stops trying to read one track at
once.
 2. The new FDGETMAXERRS ioctl reads back these two tresholds.
 3. The new FDGETEMSTRESH ioctl reads back the error reporting
treshold (as set by FDSETEMSTRESH)
 4. The new FDGETDRVTYP ioctl displays the type of a drive (name
parameter).
 5. Every user with write-permission to the device may now change its
geometry (instead of just the superuser). In order to make this
possible, I added some sanity checks for the geometry parameters. (no
physical track > 84 allowed. Number of sectors, heads and tracks must
be strictly positive.) This patch comes with a new mtools program
which uses this feature to set the geometry according to the geometry
found on the msdos bootsector...
 6. ... thus it is no longer necessary to autodetect formats with
more than the standard number of sectors. Autodetection of these
formats has now become option (option in make config)
 7. The number of autodetected tracks is now also configurable via
make config.

II. Bug fixes:
==============
 1. Buffered tracks were not invalidated on a geometry change. After
changing the geometry of the drive to a geometry with more sectors,
reading the additional sectors returned random data.
 2. When the user specified a geometry with 0 sectors or heads and
then tried to read from the disk, a "division by zero error" occured
in the kernel, and some locks were not released correctly. I added
a sanity checks to make FDSETPRM fail under this condition. I added
a similar checks for the number of tracks.
 3. When you tried to format a drive which is not defined in the CMOS,
you sometimes got a segmentation fault.
 4. I added a check to the open routine to make sure the minor device
number corresponds to an existing format.

 These bugs are now fixed.

 Example programs:
 =================
 1. floppycontrol. This program sets the various error tresholds
(error reporting, operation abortion, and read track), prints out
drive drive types, and flushes buffers. There is a -h help option.
 This program provides examples on how to use the new ioctl's.
 
 To compile this program just type make in the util directory.

 Floppycontrol must be recompiled whenever you change any options
relevant to fdpatches in the kernel make config.

 2. MAKEFLOPPIES. This shell script creates the new floppy block
device files.  It uses the floppycontrol program to translate the
minor device numbers into meaningful names. It also uses these names
to decide wether to create a given block device file or not, depending
on the type of the physical drive (for instance, for a 3 1/2 drive,
the formats corresponding to a 5 1/4 drive are not created).
 If you have more than two floppy drives, the kernel cannot find out
the types of these additional drives, and you need to specify them
with the environmental variables FD2 and FD3. The following types are
available: 1.44M ( HD 3''1/2), 1.2M (HD 5''1/4), 720k (DD 3''1/2) and
360k (DD 5''1/4).
 Sample command line:
  FD2=1.44M FD3=1.2M MAKEFLOPPIES

 IMPORTANT: The MAKEFLOPPIES script needs the floppycontrol program on
the search PATH.


 New mtools:
 ===========
 The mtools program that comes with fdpatches reads the bootsector of
msdos disks and automatically sets the geometry according to the one
found in the bootsector. It is based on mtools-2.0.7.
 I added some other new features to it, see mtools-2.0.7alk/Release.Notes
for details.

 You can use this new mtools without the fdpatches (in that case, it
doesn't adjust the geometry of course, but you still will get the
other features.)

Installation:
=============

 1. First untar the package.
 2. Then patch the kernel:
     cd /linux
     patch -p1 -l < fdpatches2for15

 3. Compile the kernel:
     make

 4. Install the kernel with lilo, and reboot. (See the Lilo Doc for details)

 5. Compile floppycontrol.c
      cd util
      make

 6. Run the MAKEFLOPPIES script to create the device files:
      cd /dev
      MAKEFLOPPIES

 7. Compile mtools
      cd mtools-2.0.7alk
      make

 8. Enjoy!
 I you have any questions, feel free to ask!

   A. Knaff
  ( Alain.Knaff@imag.fr )

