Subject: Re: CHanges to sd and cd drivers
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Kenneth D. Merry <ken@plutotech.com>
List: tech-kern
Date: 01/21/1999 13:26:28
Manuel Bouyer wrote...
> On Jan 20, Soren S. Jorvang wrote
> > I like this (or anything similar that allows operation on devices without
> > loaded media).
> > 
> > This reminds me of a related issue.
> > 
> > The current code return EIO for both 'no media' and 'media error's. 
> > 
> > I noticed because I have '<SyQuest, EZ135S, 1_13> SCSI2 0/direct removable' that
> > makes the i386 findroot() print 'findroot: can't open dev sd0a (5)' during
> > autoconfiguration.
> > 
> > Should 'no media' and 'media error' perhaps return different errors?
> > 
> 
> The harder part is to find which error to return :)
> Mayby ENOENT ? 
> I'm open to any other suggestion.

FWIW, in FreeBSD/CAM we return ENXIO for medium not present type errors.

(Not sure that it matters all that much, you probably just want a return
value that makes some sense, and at least vaguely distinguishes itself from
more catastrophic errors.)

Ken
-- 
Kenneth Merry
ken@plutotech.com