From 22d0f9a7d8e631cf0ed8f90bc2c45e4b04c4d2cb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Oct 2021 18:54:52 +0200 Subject: [PATCH] systemctl: make dbus PID cgroup tree output look more like systemd-cgls MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c index 50deb9252e2..87c0334fec5 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c @@ -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()); } } -- 2.47.3