summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dev.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-01-13 11:34:35 +0000
committerphk <phk@FreeBSD.org>2003-01-13 11:34:35 +0000
commite67e97880da9f5f944e3f78a7dcc4cc252c51ee0 (patch)
treeb65312f50167b77240b2dcbebaee615ea7b709df /sys/geom/geom_dev.c
parentab47952ce009632a41e7916dca900d27f4b30b1d (diff)
downloadFreeBSD-src-e67e97880da9f5f944e3f78a7dcc4cc252c51ee0.zip
FreeBSD-src-e67e97880da9f5f944e3f78a7dcc4cc252c51ee0.tar.gz
Always issue ioctls as BIO_GEATTR requests. The direction of data copies on
ioctls are no reliable indication of the ioctls "set" or "get" nature or if such simplistic categories can even be applied. MFC candidate: boot0cfg issue.
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r--sys/geom/geom_dev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 8d95d19..188fc29 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -307,10 +307,12 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
gio->fflag = fflag;
gio->td = td;
i = sizeof *gio;
- if (cmd & IOC_IN)
- error = g_io_setattr("GEOM::ioctl", cp, i, gio);
- else
- error = g_io_getattr("GEOM::ioctl", cp, &i, gio);
+ /*
+ * We always issue ioctls as getattr since the direction of data
+ * movement in ioctl is no indication of the ioctl being a "set"
+ * or "get" type ioctl or if such simplistic terms even apply
+ */
+ error = g_io_getattr("GEOM::ioctl", cp, &i, gio);
break;
}
OpenPOWER on IntegriCloud