mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
systemctl: no need to pass --all if inactive is explicitly requested in list-units
If list-units command is explicitly asked to show inactive units by using '--state=inactive' option, there's no need to force the user to pass '--all' option to include inactive units in the search in this case.
This commit is contained in:
parent
c41d3b3a0c
commit
ebc962656c
@ -340,6 +340,11 @@ static bool output_show_unit(const UnitInfo *u, char **patterns) {
|
||||
if (arg_all)
|
||||
return true;
|
||||
|
||||
if (!strv_isempty(arg_states))
|
||||
return true;
|
||||
|
||||
/* By default show all units except the ones in inactive
|
||||
* state and with no pending job */
|
||||
if (u->job_id > 0)
|
||||
return true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user