core: report root cgroup as "/" over the bus
authorLennart Poettering <lennart@poettering.net>
Tue, 25 Aug 2015 18:42:50 +0000 (20:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Aug 2015 18:42:50 +0000 (20:42 +0200)
commit98bac6058c919071ba6b7860b925decacafdc822
treec93cceec5cc5ad1736950dd661c8643696f681fe
parent37a0d5bf212df5b45ded449f4adaefd737df058b
core: report root cgroup as "/" over the bus

Internally, the root cgroup is stored as the empty string in
Unit.cgroup_path, and "no cgroup" as NULL. Unfortunately, D-Bus does not
know a NULL concept, hence when reporting the cgroup to clients we
should turn the root cgroup into "/", and leave the empty string for the
"no cgroup" case.

This should make sure that "systemctl status -- -.slice" works correctly
and shows the entire cgroup tree.
src/core/dbus-unit.c