summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-09 16:50:18 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-09 17:06:18 +0200
commit6d4fc029d9c6647927f3b73235d5d5bb17ce46ee (patch)
treeda81f11bcbd279b221aceb86de59266926f8a7a2 /src
parent00bfd428a93ddc97bac03083c85f7642f8e1822b (diff)
systemctl: show exit code only if it is actually set
Diffstat (limited to 'src')
-rw-r--r--src/systemctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 1844638ba2..27e5e3708e 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -1529,14 +1529,15 @@ static void print_status_info(UnitStatusInfo *i) {
printf(" (%s)", t);
free(t);
}
- } else {
+ } else if (i->exit_code > 0) {
printf(" (code=%s, ", sigchld_code_to_string(i->exit_code));
if (i->exit_code == CLD_EXITED)
printf("status=%i", i->exit_status);
else
printf("signal=%s", signal_to_string(i->exit_status));
- printf(")"); }
+ printf(")");
+ }
}
if (i->main_pid > 0 && i->control_pid > 0)