]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: use empty_to_root() where appropriate
authorLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 14:42:22 +0000 (16:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 14:42:22 +0000 (16:42 +0200)
src/systemctl/systemctl-show.c

index 29f1f7fd328762d4f2f04e0b0e5deea85ae0ccca..c3a9ba763d6515ff27479bd0efee0984242cd2b0 100644 (file)
@@ -2090,7 +2090,7 @@ static int show_system_status(sd_bus *bus) {
                FORMAT_TIMESTAMP_STYLE(mi.timestamp, arg_timestamp_style),
                FORMAT_TIMESTAMP_RELATIVE(mi.timestamp));
 
-        printf("   CGroup: %s\n", mi.control_group ?: "/");
+        printf("   CGroup: %s\n", empty_to_root(mi.control_group));
         if (IN_SET(arg_transport,
                    BUS_TRANSPORT_LOCAL,
                    BUS_TRANSPORT_MACHINE)) {