diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2005-04-14 04:51:18 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2005-04-14 04:51:18 +0000 |
| commit | e3e16e999862f539420381a93f482885e5e8118b (patch) | |
| tree | 18f5ac08d3e3220d8a2bd7d08db814ce10073cb3 | |
| parent | cd6640869be0a8f8bdae864ab9e1b5e7d72d0659 (diff) | |
Notes
| -rw-r--r-- | sys/cam/scsi/scsi_sa.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index fd9c251368a5..88ad7a25ea61 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -810,10 +810,29 @@ saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } break; + case MTIOCTOP: + { + struct mtop *mt = (struct mtop *) arg; + + /* + * Check to make sure it's an OP we can perform + * with no media inserted. + */ + switch (mt->mt_op) { + case MTSETBSIZ: + case MTSETDNSTY: + case MTCOMP: + mt = NULL; + /* FALLTHROUGH */ + default: + break; + } + if (mt != NULL) { + break; + } + /* FALLTHROUGH */ + } case MTIOCSETEOTMODEL: - case MTSETBSIZ: - case MTSETDNSTY: - case MTCOMP: /* * We need to acquire the peripheral here rather * than at open time because we are sharing writable |
