]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
[systemctl] Don't print ExecXYZEx= when doing 'systemctl status'
authorAnita Zhang <the.anitazha@gmail.com>
Tue, 23 Jul 2019 20:26:51 +0000 (13:26 -0700)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Jul 2019 07:00:57 +0000 (09:00 +0200)
The info printed in this function is the same as the non-Ex version of the
property so there's no point double printing.

Other places that print ExecXYZEx= properties are left alone since the
displayed information is different.

src/systemctl/systemctl.c

index 97f3176cc554353175ba73d23d01d00d18febd36..95a85245946a88f0f5f65ba4bd529a2863e89b1a 100644 (file)
@@ -4358,6 +4358,11 @@ static void print_status_info(
                 if (p->code == 0)
                         continue;
 
+                /* Don't print ExecXYZEx= properties here since it will appear as a
+                 * duplicate of the non-Ex= variant. */
+                if (endswith(p->name, "Ex"))
+                        continue;
+
                 argv = strv_join(p->argv, " ");
                 printf("  Process: "PID_FMT" %s=%s ", p->pid, p->name, strna(argv));