Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 1996 23:27:50 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-bugs@FreeBSD.org (FreeBSD bugs list)
Subject:   Re: installation 2.1.6
Message-ID:  <199612182227.XAA24140@uriah.heep.sax.de>
In-Reply-To: <9612182200.AA09033@halloran-eldar.lcs.mit.edu> from Garrett Wollman at "Dec 18, 96 05:00:22 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Garrett Wollman wrote:

> > special file.  Due to the poor errno mechanism, it cannot distinguish
> > between no media available and device probe failed: both are meant to
> > be ENXIO (if the driver has been implemented correctly).
> 
> Actually, no... this means the driver has been implemented
> INcorrectly.  A correctly working driver should be openable regardless
> of whether or not there is a tape in the drive so that the user can
> perform ioctl(2) calls on it to determine definitively whether or not
> there is a tape in the drive (and perhaps other things).

No, that's what control devices are usually for.  You can't open a
disk device without a disk in it either.  Or take floppies, with an
automagic format detection feature one could imagine -- the return of
the open() must indicate whether it's of any use to continue.  It's
pointless to defer the format detection until the first actual IO, to
finally detect there that you gotta give up.  read(2) and write(2) are
not supposed to return ENXIO.

-- 
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?199612182227.XAA24140>