Date: Fri, 11 Jan 2002 00:46:53 +0100 From: Joerg Wunsch <j@uriah.heep.sax.de> To: Julian Stacey <jhs@jhs.muc.de> Cc: Terry Lambert <tlambert2@mindspring.com>, Nils Holland <nils@tisys.org>, freebsd-hackers@freebsd.org Subject: Re: FreeBSD Floppy driver needs enhancement... Message-ID: <20020111004653.A69116@uriah.heep.sax.de> In-Reply-To: <200201102126.g0ALQeA55983@jhs.muc.de>; from jhs@jhs.muc.de on Thu, Jan 10, 2002 at 10:26:40PM %2B0100 References: <tlambert2@mindspring.com> <200201102126.g0ALQeA55983@jhs.muc.de>
next in thread | previous in thread | raw e-mail | index | archive | help
As Julian Stacey wrote: > Would be nice, Joerg W. (cc'd) looked in that direction somewhat > I recall, I can't remember how far he got, I do recall some patches > I didnt get to try, can't remember quite what for, Joerg, can > you recall ? Use "fdread -r" for this (FreeBSD-current only). > Anyway, if anyone does offer such a read(), I'll add it to valid(). Well, it's not that simple. Have a look at how fdread implements it... Basically, there's no way how a Unix read(2) can both return (erroneous) data /and/ simultaneously notify the caller there has been an error. The hack is that you explicitly need to turn off driver error reporting once you know about your bad sector, then read the sector with error reporting turned off, and eventually turn it on again to continue. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020111004653.A69116>