Subject: mtools & floppies
To: None <>
From: Luke Mewburn <>
List: current-users
Date: 02/09/1994 09:58:23
A long time ago (in my 386bsd 0.1 with patchkit xx.yy.zz) I had a version
of mtools that worked. The latest version even. (I took someone else's patches
to auto-sense your c: or d:, and incorporated in the changes from the
shipped 2.0.5 into 2.0.7. I also removed gets() and cleaned up the code
a lot.)

Over the last couple of days I decided to try again with mtools. I've
decided to rename it as mtools-2.1 and here's what I've added that's
different from mtools-2.0.7 as shipped by GNU:
- totally rewritten the source to use autoconf instead of #defines
  for BSD which are wrong for modern (read NetBSD) anyway. Needs some
  slight work to autoconf timezone & locking. (Will do that tonight)
- added driver entries for NetBSD. (The old ones for 386BSD had all
  drives from fd0c (360k, 720k, etc) wrong for netbsd's fd.c)
  Hopefully they should match the kernel's view, i.e:
	fd0a	1.44
	fd0b	1.2
	fd0c	360 (in 1.2 drive)
	fd0d	360 (in 360 drive)
	fd0e	720 (in 1.44 drive)
- removed gets(), replaced with fgets()
- a lot of other `cleanups'. Mtools is an example of how not to write
  C code (not to say mine is the best, but debugging mtools must be a
  bitch given it's current incarnation.)

What I've got to do before making it usable for netbsd >0.9 distributions:
- test the 720K support. To do this, I need a _correct_ definition for
  a 720k disc in a 1.44MB drive. My entry for isa/fd.c is:
	{ 9,2,0xFF,0x2A,80,1440,1,1,2 }
    (the shipped has 1,0,[0] as the last 3 bytes, the last 0 being implicit)
  I've yet to test this, but I think it's correct.
  If anyone has a _known working 720k in 1.44mB drive entry, please mail
  me personally so I can put it in my kernel and test mtools.
- finish the TZ & filelocking autoconf stuff.

I should have something by the end of the week, depending on whether or not
I can get my motherboard working. (I think my FDD/HDD/S/P/G controller bit
it last night - have to buy another today):

Luke Mewburn, <>