aboutsummaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1997-12-20 23:03:49 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1997-12-20 23:03:49 +0000
commit1cb18ce25d36afad700770780a783fdcd50bb8b6 (patch)
treee32c5b22355da1d4ed63bad98693b3c2c043432e /sys/scsi
parent675c4fdb61f54e91b5c570a6145ce9e41d941561 (diff)
Notes
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/worm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c
index bff501404f8f2..b0117d51be33f 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
@@ -495,6 +498,14 @@ worm_open(dev_t dev, int flags, int fmt, struct proc *p,
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
* "unit attention" error which the error code will