diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-09 19:40:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-09 19:40:29 +0000 |
commit | 8e0541333e432b60901d5c92baca23320ecdc9a6 (patch) | |
tree | ddf3dc43207846af39f0659dd598a4a93fc32391 /sys/dev | |
parent | 6d1a1e9781ac4dad9bbc6d8646c5c300b151a63d (diff) |
support MTIOCTOP's MTOFFL to mean "eject"
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/isa/fd.c | 7 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 7 |
2 files changed, 12 insertions, 2 deletions
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); |