summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-21 14:24:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-21 14:24:55 +0000
commitab2aa3063ff3c37f49f3243507993982a314c165 (patch)
tree0c94abe4f14e18b0e652566bcc08a227a49afdad
parent621f0d3911c5e59f98737d399cc54ac5e8cef1f7 (diff)
mt -f /dev/rcd* offline support
-rw-r--r--sys/scsi/cd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 3dbe5c741f7..62e499e858a 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -54,6 +54,7 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/mtio.h>
#include <sys/buf.h>
#include <sys/uio.h>
#include <sys/malloc.h>
@@ -800,6 +801,9 @@ cdioctl(dev, cmd, addr, flag, p)
return scsi_start(cd->sc_link, SSS_START, 0);
case CDIOCSTOP:
return scsi_start(cd->sc_link, SSS_STOP, 0);
+ case MTIOCTOP:
+ if (((struct mtop *)addr)->mt_op != MTOFFL)
+ return EIO;
case CDIOCEJECT:
return scsi_start(cd->sc_link, SSS_STOP|SSS_LOEJ, 0);
case CDIOCALLOW: