]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Resource pools are now named.
authorMartin Mares <mj@ucw.cz>
Tue, 26 May 1998 21:37:37 +0000 (21:37 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 26 May 1998 21:37:37 +0000 (21:37 +0000)
lib/resource.c
lib/resource.h
nest/rt-attr.c

index fe879cf6cdc1ae734496fbfa16dfd8732d41b4d8..ce0ba14b058e831f7a401114b08faacad82b5150 100644 (file)
@@ -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);
 }
 
index 03c083a52f7acba6a582f418799902c1544aa71d..5c8d863d74ac699d17fc6bdc55e3f0ffad03bb41 100644 (file)
@@ -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 */
index a5ee77cbc0905fecd8816b7bdf290b7950e7d2dc..e6676252d7946b33dad056c26fe396299a5ed3e2 100644 (file)
@@ -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));
 }