diff options
author | phk <phk@FreeBSD.org> | 2003-01-13 11:34:35 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-13 11:34:35 +0000 |
commit | e67e97880da9f5f944e3f78a7dcc4cc252c51ee0 (patch) | |
tree | b65312f50167b77240b2dcbebaee615ea7b709df /sys | |
parent | ab47952ce009632a41e7916dca900d27f4b30b1d (diff) | |
download | FreeBSD-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')
-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; } |