cgls: pretty print root cgroup path

Make sure show it as "/" rather than empty string.
This commit is contained in:
Lennart Poettering 2015-08-31 13:03:16 +02:00
parent 90990e28c9
commit 324496eb25

View file

@ -263,7 +263,7 @@ int main(int argc, char *argv[]) {
if (r < 0)
goto finish;
printf("Control group %s:\n", root);
printf("Control group %s:\n", isempty(root) ? "/" : root);
fflush(stdout);
r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, root, NULL, 0, arg_kernel_threads, output_flags);