ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
65878a
From 6a2697e8d12f8a09caa26394ecdbbb6d0721f757 Mon Sep 17 00:00:00 2001
65878a
From: Olivier Brunel <jjk@jjacky.com>
65878a
Date: Fri, 20 Sep 2013 22:18:29 +0200
65878a
Subject: [PATCH] Only disable output on console during boot if needed
65878a
65878a
If there are no more jobs on console, no need/we shouldn't disable output.
65878a
---
65878a
 src/core/manager.c | 2 +-
65878a
 src/core/unit.c    | 2 +-
65878a
 2 files changed, 2 insertions(+), 2 deletions(-)
65878a
65878a
diff --git a/src/core/manager.c b/src/core/manager.c
65878a
index 58dacdc..ce32baf 100644
65878a
--- a/src/core/manager.c
65878a
+++ b/src/core/manager.c
65878a
@@ -1761,7 +1761,7 @@ static int process_event(Manager *m, struct epoll_event *ev) {
65878a
         }
65878a
 
65878a
         case WATCH_IDLE_PIPE: {
65878a
-                m->no_console_output = true;
65878a
+                m->no_console_output = m->n_on_console > 0;
65878a
 
65878a
                 manager_unwatch_idle_pipe(m);
65878a
                 close_idle_pipe(m);
65878a
diff --git a/src/core/unit.c b/src/core/unit.c
65878a
index 0f57b06..acd9c74 100644
65878a
--- a/src/core/unit.c
65878a
+++ b/src/core/unit.c
65878a
@@ -1457,7 +1457,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
65878a
 
65878a
                                 if (m->n_on_console == 0)
65878a
                                         /* unset no_console_output flag, since the console is free */
65878a
-                                        m->no_console_output = 0;
65878a
+                                        m->no_console_output = false;
65878a
                         } else
65878a
                                 m->n_on_console ++;
65878a
                 }