From: Zbigniew Jędrzejewski-Szmek Date: Thu, 30 Oct 2014 02:51:00 +0000 (-0400) Subject: systemctl: obey --state in list-unit-files X-Git-Tag: v218~666 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=fec1530e6b5b8d6dc352c7338010357126e84621 systemctl: obey --state in list-unit-files --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index b71040be4..8481a9b20 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; }