diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-14 10:02:24 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-14 10:02:24 +0000 |
commit | d0e17c1b913aad0aede2624a0bbfbeabfed6edda (patch) | |
tree | d375be22c1ad8d82eed576c62ae3377b242d7140 /sys | |
parent | 0e72a508c2c94931944ef1a100e39be3d0c0beb0 (diff) | |
download | src-d0e17c1b913aad0aede2624a0bbfbeabfed6edda.tar.gz src-d0e17c1b913aad0aede2624a0bbfbeabfed6edda.zip |
Add more KASSERTS.
Sponsored by: DARPA & NAI Labs.
Notes
Notes:
svn path=/head/; revision=105091
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/geom_dump.c | 2 | ||||
-rw-r--r-- | sys/geom/geom_io.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c index 5b298358bc3a..b94499135507 100644 --- a/sys/geom/geom_dump.c +++ b/sys/geom/geom_dump.c @@ -219,11 +219,11 @@ void g_confxml(void *p) { + g_topology_assert(); g_conf_specific(p, NULL, NULL, NULL, NULL); wakeup(p); } - void g_trace(int level, char *fmt, ...) { diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index deb8978bf769..a33c2ee2c9f1 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -212,7 +212,9 @@ g_io_request(struct bio *bp, struct g_consumer *cp) int error; off_t excess; - KASSERT(cp != NULL, ("bio_request on thin air")); + KASSERT(cp != NULL, ("NULL cp in g_io_request")); + KASSERT(bp != NULL, ("NULL bp in g_io_request")); + KASSERT(bp->bio_data != NULL, ("NULL bp->data in g_io_request")); error = 0; bp->bio_from = cp; bp->bio_to = cp->provider; @@ -300,6 +302,10 @@ void g_io_deliver(struct bio *bp, int error) { + KASSERT(bp != NULL, ("NULL bp in g_io_deliver")); + KASSERT(bp->bio_from != NULL, ("NULL bio_from in g_io_deliver")); + KASSERT(bp->bio_from->geom != NULL, ("NULL bio_from->geom in g_io_deliver")); + KASSERT(bp->bio_to != NULL, ("NULL bio_to in g_io_deliver")); g_trace(G_T_BIO, "g_io_deliver(%p) from %p(%s) to %p(%s) cmd %d error %d", bp, bp->bio_from, bp->bio_from->geom->name, |