diff options
Diffstat (limited to 'src/unit.c')
-rw-r--r-- | src/unit.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/unit.c b/src/unit.c index 5006742d9d..e0f4a1bb31 100644 --- a/src/unit.c +++ b/src/unit.c @@ -686,9 +686,17 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { fprintf(f, "%s\tControlGroup: %s:%s\n", prefix, b->controller, b->path); - LIST_FOREACH(by_unit, a, u->meta.cgroup_attributes) + LIST_FOREACH(by_unit, a, u->meta.cgroup_attributes) { + char *v = NULL; + + if (a->map_callback) + a->map_callback(a->controller, a->name, a->value, &v); + fprintf(f, "%s\tControlGroupAttribute: %s %s \"%s\"\n", - prefix, a->controller, a->name, a->value); + prefix, a->controller, a->name, v ? v : a->value); + + free(v); + } if (UNIT_VTABLE(u)->dump) UNIT_VTABLE(u)->dump(u, f, prefix2); |