summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-03-23 13:08:04 +0100
committerDaniel Mack <github@zonque.org>2016-03-23 13:08:04 +0100
commit15cb891e154bd77b339db1d8a8532afabb52a591 (patch)
tree8dad6391fc51126145354d32a0d8654d5838fc48 /src
parent51359d02d176d6f7908dcc3456f2e7a913bd5de4 (diff)
parentebc962656cee33e3e8395f456a8208c3ca41969c (diff)
Merge pull request #2886 from fbuihuu/systemctl-list-units-inactive-state
systemctl: no need to pass --all if inactive is explicitly requested …
Diffstat (limited to 'src')
-rw-r--r--src/systemctl/systemctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 180c8f9656..2afb7bad1a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -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;