]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: make dbus PID cgroup tree output look more like systemd-cgls 21172/head
authorLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 16:54:52 +0000 (18:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 16:54:52 +0000 (18:54 +0200)
Let's add the same dash of color (well, grey, …) to the dbus-based
pid/cgroup tree output as systemd-cgls has.

src/shared/bus-unit-procs.c

index 50deb9252e26309c97e54730a6031b3f7eb8afa2..87c0334fec5803d518e1b90b32adeb6ab4314ce7 100644 (file)
@@ -188,11 +188,13 @@ static int dump_processes(
                         more = i+1 < n || cg->children;
                         special = special_glyph(more ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_GLYPH_TREE_RIGHT);
 
-                        fprintf(stdout, "%s%s%*"PID_PRI" %s\n",
+                        fprintf(stdout, "%s%s%s%*"PID_PRI" %s%s\n",
                                 prefix,
                                 special,
+                                ansi_grey(),
                                 width, pids[i],
-                                name);
+                                name,
+                                ansi_normal());
                 }
         }