diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-25 21:16:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-25 22:10:22 +0100 |
commit | eeaedb7c26375352c32ec290cd716f2ff2dbe61a (patch) | |
tree | 6e47243cdb86d2ec63ac70246c313a3325ef4dd3 /src/core/unit.c | |
parent | 9670d583d381d4c2c7f4d80de63bee7ad54fef44 (diff) |
core: include following set data in dump
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 894485f6d7..57f0a86c01 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -716,6 +716,8 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { timestamp4[FORMAT_TIMESTAMP_MAX], timespan[FORMAT_TIMESPAN_MAX]; Unit *following; + _cleanup_set_free_ Set *following_set = NULL; + int r; assert(u); assert(u->type >= 0); @@ -767,9 +769,18 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { STRV_FOREACH(j, u->documentation) fprintf(f, "%s\tDocumentation: %s\n", prefix, *j); - if ((following = unit_following(u))) + following = unit_following(u); + if (following) fprintf(f, "%s\tFollowing: %s\n", prefix, following->id); + r = unit_following_set(u, &following_set); + if (r >= 0) { + Unit *other; + + SET_FOREACH(other, following_set, i) + fprintf(f, "%s\tFollowing Set Member: %s\n", prefix, other->id); + } + if (u->fragment_path) fprintf(f, "%s\tFragment Path: %s\n", prefix, u->fragment_path); |