diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index bff501404f8..b0117d51be3 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: worm.c,v 1.47 1997/10/27 21:09:27 jmz Exp $ + * $Id: worm.c,v 1.48 1997/12/02 21:07:07 phk Exp $ */ #include "opt_bounce.h" @@ -264,6 +264,9 @@ wormattach(struct scsi_link *sc_link) #endif struct scsi_data *worm = sc_link->sd; + if (sc_link->devmodes == 0) + printf(", warning: unknown drive type", unit); + bufq_init(&worm->buf_queue); #ifdef DEVFS @@ -494,6 +497,14 @@ worm_open(dev_t dev, int flags, int fmt, struct proc *p, if (sc_link->flags & SDEV_OPEN) return EBUSY; + /* + * Unknown drive type: only the control device can be opened + * in this case, so scsi(8) and things like cdrecord will + * work. + */ + if (sc_link->devmodes == 0) + return ENXIO; + /* * Check that it is still responding and ok. * if the media has been changed this will result in a