summaryrefslogtreecommitdiff
path: root/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-19 00:22:34 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-19 00:22:34 +0100
commita66d02c3290008d50b2b52f84cfbf46a546ba831 (patch)
treeba2c64f260e8a256c93f5b722dc926d2343b15ca /manager.c
parent4609154d5513108478f603ff1589e486c001daa9 (diff)
add functions for dumping server state
Diffstat (limited to 'manager.c')
-rw-r--r--manager.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/manager.c b/manager.c
index 0ad60b2b0b..86ed086eb3 100644
--- a/manager.c
+++ b/manager.c
@@ -333,3 +333,25 @@ finish:
*_ret = ret;
return 0;
}
+
+void manager_dump_jobs(Manager *s, FILE *f) {
+ void *state;
+ Job *j;
+
+ assert(s);
+ assert(f);
+
+ HASHMAP_FOREACH(j, s->jobs, state)
+ job_dump(j, f);
+}
+
+void manager_dump_names(Manager *s, FILE *f) {
+ void *state;
+ Name *n;
+
+ assert(s);
+ assert(f);
+
+ HASHMAP_FOREACH(n, s->names, state)
+ name_dump(n, f);
+}