From 324496eb25b51395a00430b28fac639502df9e3e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 31 Aug 2015 13:03:16 +0200 Subject: cgls: pretty print root cgroup path Make sure show it as "/" rather than empty string. --- src/cgls/cgls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 22f33f000d..a8d910d532 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -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); -- cgit v1.2.3-54-g00ecf