From f3274407b45770b0322727030976e39c9a57c125 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 6 Dec 1997 14:27:56 +0000 Subject: Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that are not handled at a particular level. --- sys/scsi/od.c | 4 ++-- sys/scsi/sd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/scsi') diff --git a/sys/scsi/od.c b/sys/scsi/od.c index 989483f..9f9b077 100644 --- a/sys/scsi/od.c +++ b/sys/scsi/od.c @@ -28,7 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: od.c,v 1.32 1997/09/21 22:03:01 gibbs Exp $ + * $Id: od.c,v 1.33 1997/12/02 21:06:59 phk Exp $ */ /* @@ -701,7 +701,7 @@ od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, default: error = dsioctl("od", dev, cmd, addr, flag, &od->dk_slices, odstrategy1, (ds_setgeom_t *)NULL); - if (error == -1) { + if (error == ENOIOCTL) { if (PARTITION(dev) != RAW_PART) { error = ENOTTY; } else { diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index b07cbbb..fd6be1c 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -15,7 +15,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.114 1997/11/23 11:30:42 bde Exp $ + * $Id: sd.c,v 1.115 1997/12/02 21:07:03 phk Exp $ */ #include "opt_bounce.h" @@ -678,7 +678,7 @@ sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, error = dsioctl("sd", dev, cmd, addr, flag, &sd->dk_slices, sdstrategy1, (ds_setgeom_t *)NULL); scsi_device_unlock(sc_link); - if (error != -1) + if (error != ENOIOCTL) return (error); if (PARTITION(dev) != RAW_PART) return (ENOTTY); -- cgit v1.1