From bc357ce5d7848cd43ed9e3c75c15c02a8873f095 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 16 Nov 2016 20:51:47 -0500 Subject: 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. --- src/systemctl/systemctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-54-g00ecf