diff options
author | phk <phk@FreeBSD.org> | 2003-09-01 20:45:32 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-09-01 20:45:32 +0000 |
commit | 38290a3baa454204f887614a0b0f40532eebc605 (patch) | |
tree | 0680a0b284f441a10aeec166634f34c98f8d1389 /sys/geom/geom.h | |
parent | 4e64a48fd83170feaf276dab0b984c5fc41e3896 (diff) | |
download | FreeBSD-src-38290a3baa454204f887614a0b0f40532eebc605.zip FreeBSD-src-38290a3baa454204f887614a0b0f40532eebc605.tar.gz |
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.
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 cdb5de2..40ba390 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 { |