summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/isa/fd.c7
-rw-r--r--sys/dev/isa/fd.c7
-rw-r--r--sys/dev/isa/mcd.c7
3 files changed, 18 insertions, 3 deletions
diff --git a/sys/arch/i386/isa/fd.c b/sys/arch/i386/isa/fd.c
index 1146b46da08..a9a28c2f73a 100644
--- a/sys/arch/i386/isa/fd.c
+++ b/sys/arch/i386/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.16 1996/06/01 09:36:52 deraadt Exp $ */
+/* $OpenBSD: fd.c,v 1.17 1996/06/09 19:40:28 deraadt Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -51,6 +51,7 @@
#include <sys/disk.h>
#include <sys/buf.h>
#include <sys/uio.h>
+#include <sys/mtio.h>
#include <sys/syslog.h>
#include <sys/queue.h>
@@ -1222,6 +1223,10 @@ fdioctl(dev, cmd, addr, flag, p)
int error;
switch (cmd) {
+ case MTIOCTOP:
+ if (((struct mtop *)addr)->mt_op != MTOFFL)
+ return EIO;
+ return (0);
case DIOCGDINFO:
bzero(&buffer, sizeof(buffer));
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 1146b46da08..a9a28c2f73a 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.16 1996/06/01 09:36:52 deraadt Exp $ */
+/* $OpenBSD: fd.c,v 1.17 1996/06/09 19:40:28 deraadt Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -51,6 +51,7 @@
#include <sys/disk.h>
#include <sys/buf.h>
#include <sys/uio.h>
+#include <sys/mtio.h>
#include <sys/syslog.h>
#include <sys/queue.h>
@@ -1222,6 +1223,10 @@ fdioctl(dev, cmd, addr, flag, p)
int error;
switch (cmd) {
+ case MTIOCTOP:
+ if (((struct mtop *)addr)->mt_op != MTOFFL)
+ return EIO;
+ return (0);
case DIOCGDINFO:
bzero(&buffer, sizeof(buffer));
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index d5287af366f..90ba7e0fd2d 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.14 1996/06/01 09:35:35 deraadt Exp $ */
+/* $OpenBSD: mcd.c,v 1.15 1996/06/09 19:40:12 deraadt Exp $ */
/* $NetBSD: mcd.c,v 1.49 1996/05/12 23:53:11 mycroft Exp $ */
/*
@@ -67,6 +67,7 @@
#include <sys/stat.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
+#include <sys/mtio.h>
#include <sys/cdio.h>
#include <sys/errno.h>
#include <sys/disklabel.h>
@@ -632,6 +633,10 @@ mcdioctl(dev, cmd, addr, flag, p)
return EINVAL;
case CDIOCSTOP:
return mcd_stop(sc);
+ case MTIOCTOP:
+ if (((struct mtop *)addr)->mt_op != MTOFFL)
+ return EIO;
+ /* FALLTHROUGH */
case CDIOCEJECT: /* FALLTHROUGH */
case DIOCEJECT:
return mcd_eject(sc);