Deleted Added
full compact
37c37
< __FBSDID("$FreeBSD: head/sys/geom/geom_dev.c 119593 2003-08-30 18:33:55Z phk $");
---
> __FBSDID("$FreeBSD: head/sys/geom/geom_dev.c 119660 2003-09-01 20:45:32Z phk $");
282d281
< struct g_ioctl *gio;
286d284
< gio = NULL;
292d289
< gio = NULL;
334,346c331,335
< gio = g_malloc(sizeof *gio, M_WAITOK | M_ZERO);
< gio->cmd = cmd;
< gio->data = data;
< gio->fflag = fflag;
< gio->td = td;
< i = sizeof *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;
---
> if (cp->provider->geom->ioctl != NULL) {
> error = cp->provider->geom->ioctl(cp->provider, cmd, data, td);
> if (error != ENOIOCTL)
> return (error);
> }
349,353d337
< if (error == EDIRIOCTL) {
< KASSERT(gio != NULL, ("NULL gio but EDIRIOCTL"));
< KASSERT(gio->func != NULL, ("NULL function but EDIRIOCTL"));
< error = (gio->func)(gio->dev, cmd, data, fflag, td);
< }
355,373d338
< if (gio != NULL && (error == EOPNOTSUPP || error == ENOIOCTL)) {
< if (g_debugflags & G_T_TOPOLOGY) {
< i = IOCGROUP(cmd);
< printf("IOCTL(0x%lx) \"%s\"", cmd, gp->name);
< if (i > ' ' && i <= '~')
< printf(" '%c'", (int)IOCGROUP(cmd));
< else
< printf(" 0x%lx", IOCGROUP(cmd));
< printf("/%ld ", cmd & 0xff);
< if (cmd & IOC_IN)
< printf("I");
< if (cmd & IOC_OUT)
< printf("O");
< printf("(%ld) = ENOIOCTL\n", IOCPARM_LEN(cmd));
< }
< error = ENOTTY;
< }
< if (gio != NULL)
< g_free(gio);