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? Message-ID: <Mutt.19970103103055.j@uriah.heep.sax.de> In-Reply-To: <17108.852276634@critter.dk.tfs.com>; from Poul-Henning Kamp on Jan 3, 1997 08:30:34 %2B0100 References: <5ah9kh$8rh$4@haywire.DIALix.COM> <17108.852276634@critter.dk.tfs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970103103055.j>