summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorreinoud <reinoud@NetBSD.org>2005-12-14 21:55:47 +0000
committerreinoud <reinoud@NetBSD.org>2005-12-14 21:55:47 +0000
commitcdfee8349d5bd299f66a2803dbd26e2463c18259 (patch)
tree439b6bd6bf36c81fbc6115b6e7fc428b743eeb11 /sys/dev
parentae10740c03fbb32c46288be73de60ab551296ef1 (diff)
Allow SCIOCCOMMAND ioctl that executes a SCSI command to also be issued
within the kernel when the FKIOCTL flag is passed to the ioctl. No code actually uses this yet but is committed for completion.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/scsipi/scsipi_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/scsipi/scsipi_ioctl.c b/sys/dev/scsipi/scsipi_ioctl.c
index 5bf359eb8fe..ae899af6a9c 100644
--- a/sys/dev/scsipi/scsipi_ioctl.c
+++ b/sys/dev/scsipi/scsipi_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_ioctl.c,v 1.56 2005/12/11 12:23:50 christos Exp $ */
+/* $NetBSD: scsipi_ioctl.c,v 1.57 2005/12/14 21:55:47 reinoud Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.56 2005/12/11 12:23:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.57 2005/12/14 21:55:47 reinoud Exp $");
#include "opt_compat_freebsd.h"
#include "opt_compat_netbsd.h"
@@ -337,7 +337,7 @@ scsipi_do_ioctl(struct scsipi_periph *periph, dev_t dev, u_long cmd,
si->si_uio.uio_iovcnt = 1;
si->si_uio.uio_resid = len;
si->si_uio.uio_offset = 0;
- si->si_uio.uio_segflg = UIO_USERSPACE;
+ si->si_uio.uio_segflg = (flag & FKIOCTL) ? UIO_SYSSPACE : UIO_USERSPACE;
si->si_uio.uio_rw =
(screq->flags & SCCMD_READ) ? UIO_READ : UIO_WRITE;
si->si_uio.uio_lwp = l;