ryantimwilson / rpms / systemd

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