From be073414b870fd48cfe6d14494455438a6e886d5 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Mon, 17 Jun 1996 05:16:45 +0000 Subject: SCIOCCOMMAND now requires that the device be open for writing. --- sys/scsi/scsi_ioctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index b951641bfe4..c11dfba368b 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.3 1996/06/16 23:53:16 downsj Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.4 1996/06/17 05:16:44 downsj Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.20 1996/02/14 21:47:22 christos Exp $ */ /* @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -294,6 +295,9 @@ scsi_do_ioctl(sc_link, dev, cmd, addr, flag, p) struct scsi_ioctl *si; int len; + if ((flag & FWRITE) == 0) + return EBADF; + si = si_get(); si->si_screq = *screq; si->si_sc_link = sc_link; -- cgit v1.2.3