From 3237113ee6497bdf81974f24d03b6e5d1eaf6d47 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Mon, 14 Apr 1997 04:09:18 +0000 Subject: Merge in various pieces of current NetBSD scsi code, including but not limited to: * New changer driver. * Better optical support. * Different `done' semantics. * New quirks for SCSI QIC tape driver, SCSI floppy drives. * Better support for SCSI-I devices. Everybody needs to test this. --- sys/scsi/scsi_ioctl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sys/scsi/scsi_ioctl.c') diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index c9c5625dd44..f1fc067dff8 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,5 +1,5 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.6 1996/08/13 00:06:24 niklas Exp $ */ -/* $NetBSD: scsi_ioctl.c,v 1.20 1996/02/14 21:47:22 christos Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.7 1997/04/14 04:09:11 downsj Exp $ */ +/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -289,6 +290,16 @@ scsi_do_ioctl(sc_link, dev, cmd, addr, flag, p) SC_DEBUG(sc_link, SDEV_DB2, ("scsi_do_ioctl(0x%lx)\n", cmd)); + /* Check for the safe-ness of this request. */ + switch (cmd) { + case SCIOCIDENTIFY: + break; + + default: + if ((flag & FWRITE) == 0) + return EBADF; + } + switch(cmd) { case SCIOCCOMMAND: { scsireq_t *screq = (scsireq_t *)addr; -- cgit v1.2.3