summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-28 13:47:39 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-29 15:54:53 +0200
commit148ffa2e4d43d45c53dbc0799d90400a2ba621ff (patch)
tree06589a6fcf9ce9f930789288757c910d15cd36a6 /src
parente7b9f4d9fa50e33b5755f5fc4b9717fbfc20c78d (diff)
downloadsystemd-148ffa2e4d43d45c53dbc0799d90400a2ba621ff.tar.gz
systemctl: do print all statuses/signals received from pid1
If for some reason we do not know some signal, instead of silently skipping it, let's print it numerically. Likewise, 'show' is not the right place to do value filtering for exit codes. If pid1 accepted it, let's just print it with no fuss.
Diffstat (limited to 'src')
-rw-r--r--src/systemctl/systemctl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 9e8095c8b7..880a04411c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4941,9 +4941,6 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m
}
for (i = 0; i < n_status; i++) {
- if (status[i] < 0 || status[i] > 255)
- continue;
-
if (first)
first = false;
else
@@ -4956,15 +4953,16 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m
const char *str;
str = signal_to_string((int) signal[i]);
- if (!str)
- continue;
if (first)
first = false;
else
fputc(' ', stdout);
- fputs(str, stdout);
+ if (str)
+ fputs(str, stdout);
+ else
+ printf("%"PRIi32, status[i]);
}
fputc('\n', stdout);