From 80931223ac7f88364544082f3900b5c0bb218668 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 5 Oct 2002 13:12:10 +0000 Subject: Match the new g_io_deliver() API in the kernel. Sponsored by: DARPA & NAI Labs. --- tools/regression/geom/geom_simdisk.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/regression/geom/geom_simdisk.c b/tools/regression/geom/geom_simdisk.c index c04c4a9..c2757dd 100644 --- a/tools/regression/geom/geom_simdisk.c +++ b/tools/regression/geom/geom_simdisk.c @@ -83,14 +83,12 @@ g_simdisk_start(struct bio *bp) dsp = g_simdisk_findsector(sc, off, 1); ot = lseek(sc->fd, off, SEEK_SET); if (ot != off) { - bp->bio_error = EIO; - g_io_deliver(bp); + g_io_deliver(bp, EIO); return; } i = read(sc->fd, dsp->data, sc->sectorsize); if (i < 0) { - bp->bio_error = errno; - g_io_deliver(bp); + g_io_deliver(bp, errno); return; } if (i == 0) @@ -102,7 +100,7 @@ g_simdisk_start(struct bio *bp) op += sc->sectorsize; nsec--; } - g_io_deliver(bp); + g_io_deliver(bp, 0); return; } if (bp->bio_cmd == BIO_GETATTR) { @@ -117,8 +115,7 @@ g_simdisk_start(struct bio *bp) if (g_handleattr_off_t(bp, "GEOM::mediasize", sc->mediasize)) return; } - bp->bio_error = EOPNOTSUPP; - g_io_deliver(bp); + g_io_deliver(bp, EOPNOTSUPP); } void -- cgit v1.1