37c37
< __FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 119652 2003-09-01 12:03:13Z phk $");
---
> __FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 119660 2003-09-01 20:45:32Z phk $");
196a197,214
> static int
> g_disk_ioctl(struct g_provider *pp, u_long cmd, void * data, struct thread *td)
> {
> struct g_geom *gp;
> struct disk *dp;
> int error;
>
> gp = pp->geom;
> dp = gp->softc;
>
> if (dp->d_ioctl == NULL)
> return (ENOIOCTL);
> g_disk_lock_giant(dp);
> error = dp->d_ioctl(dp, cmd, data, 0, td);
> g_disk_unlock_giant(dp);
> return(error);
> }
>
202d219
< struct g_ioctl *gio;
267,275c284
< else if ((g_debugflags & G_F_DISKIOCTL) &&
< (dp->d_ioctl != NULL) &&
< !strcmp(bp->bio_attribute, "GEOM::ioctl") &&
< bp->bio_length == sizeof *gio) {
< gio = (struct g_ioctl *)bp->bio_data;
< gio->dev = dp;
< gio->func = (d_ioctl_t *)(dp->d_ioctl);
< error = EDIRIOCTL;
< } else
---
> else
319a329
> gp->ioctl = g_disk_ioctl;
< __FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 119652 2003-09-01 12:03:13Z phk $");
---
> __FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 119660 2003-09-01 20:45:32Z phk $");
196a197,214
> static int
> g_disk_ioctl(struct g_provider *pp, u_long cmd, void * data, struct thread *td)
> {
> struct g_geom *gp;
> struct disk *dp;
> int error;
>
> gp = pp->geom;
> dp = gp->softc;
>
> if (dp->d_ioctl == NULL)
> return (ENOIOCTL);
> g_disk_lock_giant(dp);
> error = dp->d_ioctl(dp, cmd, data, 0, td);
> g_disk_unlock_giant(dp);
> return(error);
> }
>
202d219
< struct g_ioctl *gio;
267,275c284
< else if ((g_debugflags & G_F_DISKIOCTL) &&
< (dp->d_ioctl != NULL) &&
< !strcmp(bp->bio_attribute, "GEOM::ioctl") &&
< bp->bio_length == sizeof *gio) {
< gio = (struct g_ioctl *)bp->bio_data;
< gio->dev = dp;
< gio->func = (d_ioctl_t *)(dp->d_ioctl);
< error = EDIRIOCTL;
< } else
---
> else
319a329
> gp->ioctl = g_disk_ioctl;