summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-session.c2
-rw-r--r--src/systemctl/systemctl.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 676fbc15a3..a8b1d5943d 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -797,7 +797,7 @@ int session_get_idle_hint(Session *s, dual_timestamp *t) {
/* Graphical sessions should really implement a real
* idle hint logic */
- if (s->display)
+ if (SESSION_TYPE_IS_GRAPHICAL(s->type))
goto dont_know;
/* For sessions with an explicitly configured tty, let's check
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 115c00ea9c..059e985463 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -341,6 +341,12 @@ static bool output_show_unit(const UnitInfo *u, char **patterns) {
if (arg_all)
return true;
+ /* Note that '--all' is not purely a state filter, but also a
+ * filter that hides units that "follow" other units (which is
+ * used for device units that appear under different names). */
+ if (!isempty(u->following))
+ return false;
+
if (!strv_isempty(arg_states))
return true;
@@ -349,7 +355,7 @@ static bool output_show_unit(const UnitInfo *u, char **patterns) {
if (u->job_id > 0)
return true;
- if (streq(u->active_state, "inactive") || u->following[0])
+ if (streq(u->active_state, "inactive"))
return false;
return true;