summaryrefslogtreecommitdiff
path: root/sys/dev/isa/mcd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-09 19:40:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-09 19:40:29 +0000
commit8e0541333e432b60901d5c92baca23320ecdc9a6 (patch)
treeddf3dc43207846af39f0659dd598a4a93fc32391 /sys/dev/isa/mcd.c
parent6d1a1e9781ac4dad9bbc6d8646c5c300b151a63d (diff)
support MTIOCTOP's MTOFFL to mean "eject"
Diffstat (limited to 'sys/dev/isa/mcd.c')
-rw-r--r--sys/dev/isa/mcd.c7
1 files changed, 6 insertions, 1 deletions
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);