mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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.
This commit is contained in:
committed by
Luca Boccassi
parent
cea14db914
commit
dc3058e490
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user