summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/resource.c6
-rw-r--r--lib/resource.h2
-rw-r--r--nest/rt-attr.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/resource.c b/lib/resource.c
index fe879cf..ce0ba14 100644
--- a/lib/resource.c
+++ b/lib/resource.c
@@ -15,6 +15,7 @@
struct pool {
resource r;
list inside;
+ char *name;
};
static void pool_dump(resource *);
@@ -32,7 +33,7 @@ pool root_pool;
static int indent;
pool *
-rp_new(pool *p)
+rp_new(pool *p, char *name)
{
pool *z = ralloc(p, &pool_class);
init_list(&z->inside);
@@ -60,7 +61,7 @@ pool_dump(resource *P)
pool *p = (pool *) P;
resource *r;
- debug("\n");
+ debug(" %s\n", p->name);
indent += 3;
WALK_LIST(r, p->inside)
rdump(r);
@@ -112,6 +113,7 @@ void
resource_init(void)
{
root_pool.r.class = &pool_class;
+ root_pool.name = "Root";
init_list(&root_pool.inside);
}
diff --git a/lib/resource.h b/lib/resource.h
index 03c083a..5c8d863 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -32,7 +32,7 @@ struct resclass {
typedef struct pool pool;
void resource_init(void);
-pool *rp_new(pool *); /* Create new pool */
+pool *rp_new(pool *, char *); /* Create new pool */
void rp_free(pool *); /* Free everything in the pool */
void rfree(void *); /* Free single resource */
void rdump(void *); /* Dump to debug output */
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index a5ee77c..e667625 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -138,6 +138,6 @@ rta_dump_all(void)
void
rta_init(void)
{
- rta_pool = rp_new(&root_pool);
+ rta_pool = rp_new(&root_pool, "Attributes");
rta_slab = sl_new(rta_pool, sizeof(rta));
}