Date: Wed, 17 Sep 2008 17:13:39 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-stable@freebsd.org Cc: Michel Talon <talon@lpthe.jussieu.fr> Subject: Re: floppy disk controller broken Message-ID: <200809171713.39694.jhb@freebsd.org> In-Reply-To: <20080917150433.GA3585@lpthe.jussieu.fr> References: <20080917150433.GA3585@lpthe.jussieu.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 17 September 2008 11:04:33 am Michel Talon wrote: > Hello, > > when testing FreeBSD-7.1-BETA i discovered that the floppy disk > controller doesn't work correctly. Trying to format a floppy (perhaps > with bad blocks) i get: > Processing fdformat: ioctl(FD_FORM): Device not configured > instead of the normal E letter. I then checked the same problem is > present on FreeBSD-6.3 and it has been reported by Beech Rintoul (*) in > 2006! Of course the floppy disk driver is particularly messy, but > this is not pretty. > > (*) i386/103862: Error with fdformat It looks like the ioctl to format a track used to never report failures from the controller. The newer driver does. What I've done with fdformat is to make it just ignore the errors in userland instead. Try this: Index: fdformat.c =================================================================== --- fdformat.c (revision 183112) +++ fdformat.c (working copy) @@ -75,8 +75,7 @@ f.fd_formb_secno(i) = il[i+1]; f.fd_formb_secsize(i) = secsize; } - if(ioctl(fd, FD_FORM, (caddr_t)&f) < 0) - err(EX_OSERR, "ioctl(FD_FORM)"); + (void)ioctl(fd, FD_FORM, (caddr_t)&f); } static int -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809171713.39694.jhb>