From owner-freebsd-current Fri Jan 3 02:52:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id CAA12799 for current-outgoing; Fri, 3 Jan 1997 02:52:38 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id CAA12778 for ; Fri, 3 Jan 1997 02:52:22 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id LAA26991 for ; Fri, 3 Jan 1997 11:51:14 +0100 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id LAA04546 for freebsd-current@freebsd.org; Fri, 3 Jan 1997 11:51:14 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id KAA14001; Fri, 3 Jan 1997 10:30:55 +0100 (MET) Message-ID: Date: Fri, 3 Jan 1997 10:30:55 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-current@freebsd.org Subject: Re: Did my floppy drive just break or does fdformat no longer work? References: <5ah9kh$8rh$4@haywire.DIALix.COM> <17108.852276634@critter.dk.tfs.com> X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <17108.852276634@critter.dk.tfs.com>; from Poul-Henning Kamp on Jan 3, 1997 08:30:34 +0100 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Poul-Henning Kamp wrote: > That is why fdwrite(1) actually does a read&compare. I once wrote a > set of floppies with bin & src dists and found out later that my drive > was shot :-( > > Maybe read&compare should be added to the fd driver as an option... It's fairly ineffective to do it there, since you gotta allocate additional kernel buffers in the driver (you can't use the same buffer since this would destroy it before comparing). A userland tool can do it way simpler. Alas, our FDC is simply too braindead. It does have some sort of compare function, but it's plainly unusable for that purpose. I have thought about it before. The biggest problem is that you must adjust the buffer size in order to not lose revolutions. That's something the driver can only do with fairly large effort. E.g., for a 1440 KB floppy, you could best write 9 KB (one track), then read 9 KB. This will cause both operations to happen in two succeeding revolutions, without losing a revolution between them, and without much overhead for track-to-track seeking. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)