chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
systemctl: obey --state in list-unit-files
[elogind.git]
/
src
/
systemctl
/
systemctl.c
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index b71040be40f6847bbf7f086f4c4e5ca9b4ea86a9..8481a9b20cb3b52ab489a8c652b1e4ea66abe6a5 100644
(file)
--- 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;
}