diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-03-17 18:57:49 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-03-17 18:57:49 +0000 |
| commit | a6de45525346fd9ab1feda36bfaabcd2f82df03c (patch) | |
| tree | fa7d53b8f027e9189e741a6e0919503d03d793d3 | |
| parent | 31304807c110eaaa179ed7d59bc8606a8f9a34dc (diff) | |
Notes
| -rw-r--r-- | sys/geom/geom_bsd.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index 2688be1c0d60..8698d6b2b40c 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -88,24 +88,11 @@ g_bsd_start(struct bio *bp) struct g_geom *gp; struct g_bsd_softc *ms; struct g_slicer *gsp; - struct partinfo pi; struct g_ioctl *gio; gp = bp->bio_to->geom; gsp = gp->softc; ms = gsp->softc; -#if 0 - if (g_haveattr(bp, "IOCTL::DIOCGDINFO", - &ms->inram, - sizeof ms->inram)) - return (1); - else if (!strcmp(bp->bio_attribute, "IOCTL::DIOCGPART")) { - pi.disklab = &ms->inram; - pi.part = &ms->inram.d_partitions[bp->bio_to->index]; - if (g_haveattr(bp, "IOCTL::DIOCGPART", &pi, sizeof pi)) - return (1); - } -#endif if (strcmp(bp->bio_attribute, "GEOM::ioctl")) return(0); else if (bp->bio_length != sizeof *gio) @@ -117,7 +104,9 @@ g_bsd_start(struct bio *bp) g_io_deliver(bp); return (1); } +#ifdef _KERNEL if (gio->cmd == DIOCGPART) { + struct partinfo pi; pi.disklab = &ms->inram; pi.part = &ms->inram.d_partitions[bp->bio_to->index]; bcopy(&pi, gio->data, sizeof pi); @@ -125,6 +114,7 @@ g_bsd_start(struct bio *bp) g_io_deliver(bp); return (1); } +#endif return (0); } |
