diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-10 04:44:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-10 18:00:20 +0200 |
commit | b065047527a0fa951c9864a5fea7dce2a5844f2d (patch) | |
tree | e7b0c15b2cd0e501debb4b46e59ca5245c5c98ad | |
parent | 2fad8195ba3ea1b886041f61344a80bb107ae6b1 (diff) |
unit: dump some data only when unit is loaded
-rw-r--r-- | unit.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -539,27 +539,28 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++) { Unit *other; - if (set_isempty(u->meta.dependencies[d])) - continue; - SET_FOREACH(other, u->meta.dependencies[d], i) fprintf(f, "%s\t%s: %s\n", prefix, unit_dependency_to_string(d), unit_id(other)); } - fprintf(f, - "%s\tRecursive Stop: %s\n" - "%s\tStop When Unneeded: %s\n", - prefix, yes_no(u->meta.recursive_stop), - prefix, yes_no(u->meta.stop_when_unneeded)); - if (u->meta.load_state == UNIT_LOADED) { + fprintf(f, + "%s\tRecursive Stop: %s\n" + "%s\tStop When Unneeded: %s\n", + prefix, yes_no(u->meta.recursive_stop), + prefix, yes_no(u->meta.stop_when_unneeded)); + LIST_FOREACH(by_unit, b, u->meta.cgroup_bondings) fprintf(f, "%s\tControlGroup: %s:%s\n", prefix, b->controller, b->path); if (UNIT_VTABLE(u)->dump) UNIT_VTABLE(u)->dump(u, f, prefix2); - } + + } else if (u->meta.load_state == UNIT_MERGED) + fprintf(f, + "%s\tMerged into: %s\n", + prefix, unit_id(u->meta.merged_into)); if (u->meta.job) job_dump(u->meta.job, f, prefix2); |