diff options
author | phk <phk@FreeBSD.org> | 2002-09-30 08:54:46 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-30 08:54:46 +0000 |
commit | 852521acba9ca655f9805890d434284e77dc3553 (patch) | |
tree | aecab093ebd65e53e9ed7f0ce1ad3248a7fb3cb0 /sys/geom/geom_slice.c | |
parent | 72d7c1eb0e7571a3a567c7dcb80c59931eb6545d (diff) | |
download | FreeBSD-src-852521acba9ca655f9805890d434284e77dc3553.zip FreeBSD-src-852521acba9ca655f9805890d434284e77dc3553.tar.gz |
Retire g_io_fail() and let g_io_deliver() take an error argument instead.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 816bf4e..c8b4323 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -144,13 +144,12 @@ g_slice_start(struct bio *bp) case BIO_WRITE: case BIO_DELETE: if (bp->bio_offset > gsl->length) { - bp->bio_error = EINVAL; /* XXX: EWHAT ? */ - g_io_deliver(bp); + g_io_deliver(bp, EINVAL); /* XXX: EWHAT ? */ return; } bp2 = g_clone_bio(bp); if (bp2 == NULL) { - g_io_fail(bp, ENOMEM); + g_io_deliver(bp, ENOMEM); return; } if (bp2->bio_offset + bp2->bio_length > gsl->length) @@ -192,15 +191,14 @@ g_slice_start(struct bio *bp) #endif bp2 = g_clone_bio(bp); if (bp2 == NULL) { - g_io_fail(bp, ENOMEM); + g_io_deliver(bp, ENOMEM); return; } bp2->bio_done = g_std_done; g_io_request(bp2, cp); break; default: - bp->bio_error = EOPNOTSUPP; - g_io_deliver(bp); + g_io_deliver(bp, EOPNOTSUPP); return; } } @@ -240,7 +238,8 @@ g_slice_config(struct g_geom *gp, int index, int how, off_t offset, off_t length struct sbuf *sb; int error, acc; - g_trace(G_T_TOPOLOGY, "g_slice_config()"); + g_trace(G_T_TOPOLOGY, "g_slice_config(%s, %d, %d)", + gp->name, index, how); g_topology_assert(); gsp = gp->softc; error = 0; |