diff options
author | phk <phk@FreeBSD.org> | 2003-04-01 07:33:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-01 07:33:56 +0000 |
commit | 80780d2ba2c092f606651c4fb2a30b3170778c46 (patch) | |
tree | 7fc0af1638dcbf5ec86487bd1234561c3d4c9213 | |
parent | 85edc96041884b0ddea7f4409ff54a8d6251bbb5 (diff) | |
download | FreeBSD-src-80780d2ba2c092f606651c4fb2a30b3170778c46.zip FreeBSD-src-80780d2ba2c092f606651c4fb2a30b3170778c46.tar.gz |
Remove the old config interface, the new OAM is sufficiently functional
now.
-rw-r--r-- | sys/geom/geom.h | 88 | ||||
-rw-r--r-- | sys/geom/geom_ctl.c | 50 |
2 files changed, 0 insertions, 138 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 811fb8c..cd1691c 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -343,94 +343,6 @@ extern struct sx topology_lock; #endif /* _KERNEL */ -/* - * IOCTLS for talking to the geom.ctl device. - */ - -/* - * This is the structure used internally in the kernel, it is created and - * populated by geom_ctl.c. - */ -struct g_configargs { - /* Valid on call */ - struct g_class *class; - struct g_geom *geom; - struct g_provider *provider; - u_int flag; - u_int len; - void *ptr; -}; - -/* - * This is the structure used to communicate with userland. - */ -struct geomconfiggeom { - /* Valid on call */ - struct geomidorname class; - struct geomidorname geom; - struct geomidorname provider; - u_int flag; - u_int len; - void *ptr; -}; - -#define GEOMCONFIGGEOM _IOW('G', 0, struct geomconfiggeom) - -#define GCFG_GENERIC0 0x00000000 - /* - * Generic requests suitable for all classes. - */ -#define GCFG_CLASS0 0x10000000 - /* - * Class specific verbs. Allocations in this part of the numberspace - * can only be done after review and approval of phk@FreeBSD.org. - * All allocations in this space will be listed in this file. - */ -#define GCFG_PRIVATE0 0x20000000 - /* - * Lowest allocation for private flag definitions. - * If you define you own private "verbs", please express them in - * your code as (GCFG_PRIVATE0 + somenumber), where somenumber is - * a magic number in the range [0x0 ... 0xfffffff] chosen the way - * magic numbers are chosen. Such allocation SHALL NOT be listed - * here but SHOULD be listed in some suitable .h file. - */ -#define GCFG_RESERVED0 0x30000000 -#define GCFG_RESERVEDN 0xffffffff - /* - * This area is reserved for the future. - */ - -#define GCFG_CREATE (GCFG_GENERIC0 + 0x0) - /* - * Request geom construction. - * ptr/len is class-specific. - */ -#define GCFG_DISMANTLE (GCFG_GENERIC0 + 0x1) - /* - * Request orderly geom dismantling. - * ptr/len is class-specific. - */ - - -struct gcfg_magicrw { - off_t offset; - u_int len; -}; - -#define GCFG_MAGICREAD (GCFG_GENERIC0 + 0x100) - /* - * Read of magic spaces. - * ptr/len is gcfgmagicrw structure followed by bufferspace - * for data to be read. - */ -#define GCFG_MAGICWRITE (GCFG_GENERIC0 + 0x101) - /* - * Write of magic spaces. - * as above, only the other way. - */ - - /* geom_ctl.c */ void *gctl_get_param(struct gctl_req *req, const char *param, int *len); int gctl_error(struct gctl_req *req, const char *errtxt); diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index 6c7e1c4..76a5dcd 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -80,49 +80,6 @@ g_ctl_init(void) ("GCTL_PARAM_WR != VM_PROT_WRITE")); } -static int -g_ctl_ioctl_configgeom(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) -{ - struct geomconfiggeom *gcp; - struct g_configargs ga; - int error; - - error = 0; - bzero(&ga, sizeof ga); - gcp = (struct geomconfiggeom *)data; - ga.class = g_idclass(&gcp->class); - if (ga.class == NULL) - return (EINVAL); - if (ga.class->config == NULL) - return (EOPNOTSUPP); - ga.geom = g_idgeom(&gcp->geom); - ga.provider = g_idprovider(&gcp->provider); - ga.len = gcp->len; - if (gcp->len > 64 * 1024) - return (EINVAL); - else if (gcp->len == 0) { - ga.ptr = NULL; - } else { - ga.ptr = g_malloc(gcp->len, M_WAITOK); - error = copyin(gcp->ptr, ga.ptr, gcp->len); - if (error) { - g_free(ga.ptr); - return (error); - } - } - ga.flag = gcp->flag; - error = ga.class->config(&ga); - if (gcp->len != 0) - copyout(ga.ptr, gcp->ptr, gcp->len); /* Ignore error */ - gcp->class.u.id = (uintptr_t)ga.class; - gcp->class.len = 0; - gcp->geom.u.id = (uintptr_t)ga.geom; - gcp->geom.len = 0; - gcp->provider.u.id = (uintptr_t)ga.provider; - gcp->provider.len = 0; - return(error); -} - /* * Report an error back to the user in ascii format. Return whatever copyout * returned, or EINVAL if it succeeded. @@ -499,13 +456,6 @@ g_ctl_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) int error; switch(cmd) { - case GEOMCONFIGGEOM: - DROP_GIANT(); - g_topology_lock(); - error = g_ctl_ioctl_configgeom(dev, cmd, data, fflag, td); - g_topology_unlock(); - PICKUP_GIANT(); - break; case GEOM_CTL: DROP_GIANT(); error = g_ctl_ioctl_ctl(dev, cmd, data, fflag, td); |