diff options
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r-- | sys/geom/geom_dev.c | 10 |
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; } |