summaryrefslogtreecommitdiff
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2009-08-13 13:49:21 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2009-08-13 13:49:21 +0000
commit74a6604beb400e6cc433d7fda8960ce8bb0ca9ba (patch)
tree5d65e26b5bc5085f750f7b7e0e479a64fd078070 /sys/kern/subr_pool.c
parent629efe026cb80764f620bf4e2253c0ca759cb290 (diff)
add a show all vnodes command, use dlg's nice pool_walk() to accomplish
this. ok beck@, dlg@
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r--sys/kern/subr_pool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index b59b1efe90d..6841200dca0 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.87 2009/08/09 13:41:03 thib Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.88 2009/08/13 13:49:20 thib Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -1293,7 +1293,8 @@ pool_chk(struct pool *pp, const char *label)
}
void
-pool_walk(struct pool *pp, void (*func)(void *))
+pool_walk(struct pool *pp, int full, int (*pr)(const char *, ...),
+ void (*func)(void *, int, int (*)(const char *, ...)))
{
struct pool_item_header *ph;
struct pool_item *pi;
@@ -1305,7 +1306,7 @@ pool_walk(struct pool *pp, void (*func)(void *))
n = ph->ph_nmissing;
while (n--) {
- func(cp);
+ func(cp, full, pr);
cp += pp->pr_size;
}
}
@@ -1320,7 +1321,7 @@ pool_walk(struct pool *pp, void (*func)(void *))
break;
}
if (cp != (caddr_t)pi) {
- func(cp);
+ func(cp, full, pr);
n--;
}