diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-11-16 20:51:47 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-11-16 20:51:47 -0500 |
commit | bc357ce5d7848cd43ed9e3c75c15c02a8873f095 (patch) | |
tree | ba44f173ed0fce7d6ee1459bc0035af1f12b1b80 /src | |
parent | 7d992a6ede8034a36699c25c19f03e95476eedac (diff) |
systemctl: shorter list-jobs --before/--after output a bit
(before)$ systemctl list-jobs --before --after
JOB UNIT TYPE STATE
8769 foobar.device start running
A job waits for this job: 8669 (run-rb6da596d0cfa4e36b7c594cd973e795a.service/start)
8669 run-rb6da596d0cfa4e36b7c594cd973e795a.service start waiting
This job waits for a job: 8769 (foobar.device/start)
2 jobs listed.
(after)$ systemctl list-jobs --before --after
JOB UNIT TYPE STATE
8769 foobar.device start running
waiting for job 8669 (run-rb6da596d0cfa4e36b7c594cd973e795a.service/start)
8669 run-rb6da596d0cfa4e36b7c594cd973e795a.service start waiting
blocking job 8769 (foobar.device/start)
2 jobs listed.
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl/systemctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index db836639b5..5fbda23775 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2227,7 +2227,7 @@ static void output_waiting_jobs(sd_bus *bus, uint32_t id, const char *method, co } while ((r = sd_bus_message_read(reply, "(usssoo)", &other_id, &name, &type, &state, &job_path, &unit_path)) > 0) - printf("%s%u (%s/%s)\n", prefix, other_id, name, type); + printf("%s %u (%s/%s)\n", prefix, other_id, name, type); if (r < 0) { bus_log_parse_error(r); return; @@ -2309,9 +2309,9 @@ static void output_jobs_list(sd_bus *bus, const struct job_info* jobs, unsigned on, state_len, j->state, off); if (arg_jobs_after) - output_waiting_jobs(bus, j->id, "GetJobAfter", "\tA job waits for this job: "); + output_waiting_jobs(bus, j->id, "GetJobAfter", "\twaiting for job"); if (arg_jobs_before) - output_waiting_jobs(bus, j->id, "GetJobBefore", "\tThis job waits for a job: "); + output_waiting_jobs(bus, j->id, "GetJobBefore", "\tblocking job"); } if (!arg_no_legend) { |