Subject: Re: CHanges to sd and cd drivers
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Soren S. Jorvang <soren@t.dk>
List: tech-kern
Date: 01/20/1999 21:10:48
On Wed, Jan 20, 1999 at 04:30:49PM +0100, Manuel Bouyer wrote:
> I'd like to make a few changes to the sd and cd drivers
> (patches included below):
> - don't reset the SDEV_MEDIA_LOADED flag when the last partition of a sd device
>   is closed, but only when we believe the media has changed (cd already behaves
>   this way). The reset of SDEV_MEDIA_LOADED is done in the generic error
>   handler. This change allows to load a in-memory disklabel, and then
>   mount a partition. For now one would have to use a kludge to keep a parition
>   open while changing the disklabel, otherwise it would get lost when
>   'disklabel' closes the raw device.
> - allows the raw partition of a sd or cd device to be opened even if

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?


-- 
Soren