diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-29 22:51:00 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-29 23:48:10 -0400 |
commit | fec1530e6b5b8d6dc352c7338010357126e84621 (patch) | |
tree | 44cf9756f7dba0e2eadd9305f8a41e527cef1729 /src/systemctl/systemctl.c | |
parent | 6c71341aeecc3d092ed90f66e1b2c481b8e260ff (diff) |
systemctl: obey --state in list-unit-files
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r-- | src/systemctl/systemctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index b71040be40..8481a9b20c 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1268,6 +1268,11 @@ next: return false; } + if (!strv_isempty(arg_states)) { + if (!strv_find(arg_states, unit_file_state_to_string(u->state))) + return false; + } + return true; } |