From a6de45525346fd9ab1feda36bfaabcd2f82df03c Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 17 Mar 2002 18:57:49 +0000 Subject: [PATCH] Make this compile in the userland-regression testsuite again. --- sys/geom/geom_bsd.c | 16 +++------------- 1 file 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); }