[systemd-commits] src/systemctl.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Aug 9 08:06:28 PDT 2010
src/systemctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 6d4fc029d9c6647927f3b73235d5d5bb17ce46ee
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Aug 9 16:50:18 2010 +0200
systemctl: show exit code only if it is actually set
diff --git a/src/systemctl.c b/src/systemctl.c
index 1844638..27e5e37 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)
More information about the systemd-commits
mailing list