diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-09-01 20:45:32 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-09-01 20:45:32 +0000 |
commit | 497c33476706e093b6cf0d881d4301e5466d0d43 (patch) | |
tree | 0680a0b284f441a10aeec166634f34c98f8d1389 /sys/geom/geom.h | |
parent | 8778f63db257e9b161f19e0b4812956af81d7bf4 (diff) | |
download | src-497c33476706e093b6cf0d881d4301e5466d0d43.tar.gz src-497c33476706e093b6cf0d881d4301e5466d0d43.zip |
Simplify the ioctl handling in GEOM.
This replaces the current ioctl processing with a direct call path
from geom_dev() where the ioctl arrives (from SPECFS) to any directly
connected GEOM class.
The inverse of the above is no longer supported. This is the
situation were you have one or more intervening GEOM classes, for
instance a BSDlabel on top of a MBR or PC98. If you want to issue
MBR or PC98 specific ioctls, you will need to issue them on a MBR
or PC98 providers.
This paves the way for inviting CD's, FD's and other special cases
inside GEOM.
Notes
Notes:
svn path=/head/; revision=119660
Diffstat (limited to 'sys/geom/geom.h')
-rw-r--r-- | sys/geom/geom.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h index cdb5de22e42d..40ba390beb74 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -64,8 +64,8 @@ typedef int g_ctl_destroy_geom_t (struct gctl_req *, struct g_class *cp, struct typedef int g_ctl_config_geom_t (struct gctl_req *, struct g_geom *gp, const char *verb); typedef void g_init_t (struct g_class *mp); typedef void g_fini_t (struct g_class *mp); -typedef struct g_geom * g_taste_t (struct g_class *, struct g_provider *, - int flags); +typedef struct g_geom * g_taste_t (struct g_class *, struct g_provider *, int flags); +typedef int g_ioctl_t(struct g_provider *pp, u_long cmd, void *data, struct thread *td); #define G_TF_NORMAL 0 #define G_TF_INSIST 1 #define G_TF_TRANSPARENT 2 @@ -116,6 +116,7 @@ struct g_geom { g_dumpconf_t *dumpconf; g_access_t *access; g_orphan_t *orphan; + g_ioctl_t *ioctl; void *softc; unsigned flags; #define G_GEOM_WITHER 1 @@ -231,20 +232,6 @@ int g_write_data(struct g_consumer *cp, off_t offset, void *ptr, off_t length); /* geom_kern.c / geom_kernsim.c */ -#ifndef _SYS_CONF_H_ -typedef int d_ioctl_t(dev_t dev, u_long cmd, caddr_t data, - int fflag, struct thread *td); -#endif - -struct g_ioctl { - u_long cmd; - void *data; - int fflag; - struct thread *td; - d_ioctl_t *func; - void *dev; -}; - #ifdef _KERNEL struct g_kerneldump { |