summaryrefslogtreecommitdiffstats
path: root/src/systemctl
diff options
context:
space:
mode:
authorRasmus Villemoes <rv@rasmusvillemoes.dk>2024-04-24 11:16:50 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-04-24 21:31:28 +0200
commitdc3058e4901cc26a833da981a18a85563f0d4409 (patch)
tree2677234f1823d2c71f326eccadd180a5c1f364e7 /src/systemctl
parentMerge pull request #32458 from poettering/manager_get_units_for_pidref (diff)
downloadsystemd-dc3058e4901cc26a833da981a18a85563f0d4409.tar.xz
systemd-dc3058e4901cc26a833da981a18a85563f0d4409.zip
systemctl: list-jobs: interchange 'waiting for' and 'blocking' in output
The current output of 'systemctl list-jobs' with the --after and/or --before switches seems backwards. With artificial units # check-oil.service [Unit] Description=Check the oil level Before=engine-ready.target # fill-gas.service [Unit] Description=Fill the tank with gasoline Before=engine-ready.target # engine-ready.target [Unit] Description=The engine is ready [Unit] Description=Start the engine! After=engine-ready.target Wants=engine-ready.target running 'systemctl list-jobs --before --after' produces JOB UNIT TYPE STATE 93 check-oil.service start running └─ waiting for job 94 (engine-ready.target/start) - - 102 fill-gas.service start running └─ waiting for job 94 (engine-ready.target/start) - - 94 engine-ready.target start waiting └─ waiting for job 111 (start-engine.service/start) - - └─ blocking job 93 (check-oil.service/start) - - └─ blocking job 102 (fill-gas.service/start) - - 111 start-engine.service start waiting └─ waiting for job 1 (multi-user.target/start) - - └─ blocking job 94 (engine-ready.target/start) - - Obviously, job 93 is not waiting for job 94, but rather blocking it.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-list-jobs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-list-jobs.c b/src/systemctl/systemctl-list-jobs.c
index a752173e4e..fcfe2ac561 100644
--- a/src/systemctl/systemctl-list-jobs.c
+++ b/src/systemctl/systemctl-list-jobs.c
@@ -102,9 +102,9 @@ static int output_jobs_list(sd_bus *bus, const struct job_info* jobs, unsigned n
return table_log_add_error(r);
if (arg_jobs_after)
- output_waiting_jobs(bus, table, j->id, "GetJobAfter", "\twaiting for job");
+ output_waiting_jobs(bus, table, j->id, "GetJobAfter", "\tblocking job");
if (arg_jobs_before)
- output_waiting_jobs(bus, table, j->id, "GetJobBefore", "\tblocking job");
+ output_waiting_jobs(bus, table, j->id, "GetJobBefore", "\twaiting for job");
}
r = table_print(table, NULL);