From owner-freebsd-hackers Tue Jan 8 17:32:59 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from snipe.prod.itd.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id DF22837B417 for ; Tue, 8 Jan 2002 17:32:49 -0800 (PST) Received: from pool0630.cvx22-bradley.dialup.earthlink.net ([209.179.200.120] helo=mindspring.com) by snipe.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16O7bc-0001s8-00; Tue, 08 Jan 2002 17:32:41 -0800 Message-ID: <3C3B9DB6.36D9697E@mindspring.com> Date: Tue, 08 Jan 2002 17:32:38 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Stacey Cc: Nils Holland , freebsd-hackers@freebsd.org Subject: FreeBSD Floppy driver needs enhancement... References: <200201082259.g08Mx9n48972@jhs.muc.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Stacey wrote: > Doubtless some will have bad sectors by now. Here's a rescue tool: > http://bim.bsn.com/~jhs/src/bsd/jhs/bin/public/valid/valid.c & valid.1 > > `Valid' runs on FreeBSD, but only rescues when running on MSDOS ! > (because read() on DOS3.2 returns the intact buffer even if the > CRC fails, so I can then average each bit of each byte in each > sector for all reads). `Valid' works at sector level, no knowledge > of file systems, so it can rescue/ manipulate BSD FS sectors on > floppy, tar images, DOS or Minix file systems etc. Sounds like the FreeBSD floppy driver needs to be modified to return the full buffer, even if there is a CRC error. This implies a descriptor being passed, so that the CRC and the data are seperate. You could probably just wadd an ioctl that expected the descriptor to be at the front of a data buffer, so that you passed the address of the descriptor + buffer, after the ioctl(). This seems a useful feature... -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message