lp_dump(struct dump_request *dreq, resource *r)
{
linpool *m = (linpool *) r;
- struct lp_chunk *c;
- int cnt, cntl;
-
- for(cnt=0, c=m->first; c; c=c->next, cnt++)
- ;
- for(cntl=0, c=m->first_large; c; c=c->next, cntl++)
- ;
- RDUMP("(count=%d+%d total=%d+%d)\n",
- cnt,
- cntl,
- m->total,
- m->total_large);
+
+ int chunks = 0, large = 0;
+
+ RDUMP("\n%*schunks:\n", dreq->indent+3, "");
+ for (struct lp_chunk *c = m->first; c; c = c->next)
+ {
+ RDUMP("%*s%p\n", dreq->indent+6, "", c);
+ chunks++;
+ }
+ RDUMP("%*scount=%d total=%d\n", dreq->indent+3, "", chunks, m->total);
+
+ RDUMP("%*slarge:\n", dreq->indent+3, "");
+ for (struct lp_chunk *c = m->first_large; c; c = c->next)
+ {
+ RDUMP("%*s%p\n", dreq->indent+6, "", c);
+ large++;
+ }
+ RDUMP("%*scount=%d total=%d\n", dreq->indent+3, "", large, m->total_large);
}
static struct resmem