diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-01-13 21:04:15 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-01-13 21:04:15 +0000 |
commit | 89defd3f99f24a0a5097ddd9c47f90a34b8a0577 (patch) | |
tree | d3896f2eb400ce66dbb269be96518a1d15d409ff | |
parent | 3c2bea0e49d2fb1be53a4f56c5cb93e7776eb3c5 (diff) |
Notes
-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 e8857f707f4b7..74eaecb0c3ae7 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -303,10 +303,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; } |