From e67e97880da9f5f944e3f78a7dcc4cc252c51ee0 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 13 Jan 2003 11:34:35 +0000 Subject: 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. --- sys/geom/geom_dev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/geom/geom_dev.c') 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; } -- cgit v1.1