summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_bsd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-17 18:57:49 +0000
committerphk <phk@FreeBSD.org>2002-03-17 18:57:49 +0000
commit963527831aaaca7c0e6909c0a0e5b5ee4b6c12dc (patch)
treefa7d53b8f027e9189e741a6e0919503d03d793d3 /sys/geom/geom_bsd.c
parent460894ff2e1f555ee5434d55ae38eccb388034d8 (diff)
downloadFreeBSD-src-963527831aaaca7c0e6909c0a0e5b5ee4b6c12dc.zip
FreeBSD-src-963527831aaaca7c0e6909c0a0e5b5ee4b6c12dc.tar.gz
Make this compile in the userland-regression testsuite again.
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r--sys/geom/geom_bsd.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index 2688be1..8698d6b 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);
}
OpenPOWER on IntegriCloud