Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 2008 11:55:05 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG, talon@lpthe.jussieu.fr, jhb@FreeBSD.ORG
Subject:   Re: floppy disk controller broken
Message-ID:  <200809190955.m8J9t5mE092126@lurza.secnetix.de>
In-Reply-To: <20080918183250.GA48347@lpthe.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Michel Talon wrote:
 > Oliver Fromme wrote:
 > > Michel Talon wrote:
 > > > Moreover, trying to write to the floppy:
 > > > niobe# dd if=/dev/zero of=/dev/fd0 conv=noerror
 > > > dd: /dev/fd0: Input/output error
 > > > 5+0 records in
 > > > 4+0 records out
 > > > 2048 bytes transferred in 4.054404 secs (505 bytes/sec)
 > > > 
 > > > I don't expect such result. Traditionnally writing works, while reading
 > > > may fail.
 > > 
 > > Maybe I misunderstand what you're saying, but ...
 > > When I try to write to a floppy that has *not* been
 > > successfully formatted, I very much expect to get
 > > Input/output error.  Anything else would be a bug.
 > 
 > The floppy has certainly be formatted, in the past. Perhaps i
 > remember badly, i have not used floppies since years, but
 > in this case the behavior with Windows, Linux and ancient FreeBSD
 > was that you could write to the floppy, but could encounter errors
 > while reading.

Since you mentioned "ancient" FreeBSD, I assume that was
using buffered block devices, when FreeBSD still supported
them?  Nowadays /dev/fd0 is a character device which is
unbuffered, i.e. your dd(1) command goes straight to the
disk, and if the drive reports an error (typically sync
mark not found if the floppy is unformatted), it goes back
up to dd(1) immediately and you get Input/output error.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"We will perhaps eventually be writing only small modules which are identi-
fied by name as they are used to build larger ones, so that devices like
indentation, rather than delimiters, might become feasible for expressing
local structure in the source language." -- Donald E. Knuth, 1974



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809190955.m8J9t5mE092126>