projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c41d3b3
)
systemctl: no need to pass --all if inactive is explicitly requested in list-units
author
Franck Bui
<fbui@suse.com>
Wed, 23 Mar 2016 06:47:00 +0000
(07:47 +0100)
committer
Franck Bui
<fbui@suse.com>
Wed, 23 Mar 2016 07:36:05 +0000
(08:36 +0100)
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.
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index 180c8f9656cecbca6de655f129569ff4d9148acf..2afb7bad1a5ed6162d21523f222c21a27788a6ce 100644
(file)
--- 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;