summaryrefslogtreecommitdiff
path: root/Kernel/TTY/PTYMultiplexer.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-15 00:18:55 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-22 22:14:30 +0100
commit7b0a1a98d9edc5ae91df9138b695fb2bb3ead4b7 (patch)
tree460a80e34939ad908e27412bd123d733866784a2 /Kernel/TTY/PTYMultiplexer.cpp
parenta348ab55b038386bd2d0acc0c8de1c8927de12fe (diff)
downloadserenity-7b0a1a98d9edc5ae91df9138b695fb2bb3ead4b7.zip
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
Diffstat (limited to 'Kernel/TTY/PTYMultiplexer.cpp')
-rw-r--r--Kernel/TTY/PTYMultiplexer.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp
index 3ccf768b6d..65e0e6339c 100644
--- a/Kernel/TTY/PTYMultiplexer.cpp
+++ b/Kernel/TTY/PTYMultiplexer.cpp
@@ -26,13 +26,12 @@
#include "PTYMultiplexer.h"
#include "MasterPTY.h"
+#include <AK/Debug.h>
#include <AK/Singleton.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
#include <LibC/errno_numbers.h>
-//#define PTMX_DEBUG
-
namespace Kernel {
static const unsigned s_max_pty_pairs = 8;
@@ -62,9 +61,7 @@ KResultOr<NonnullRefPtr<FileDescription>> PTYMultiplexer::open(int options)
return EBUSY;
auto master_index = m_freelist.take_last();
auto master = adopt(*new MasterPTY(master_index));
-#ifdef PTMX_DEBUG
- dbg() << "PTYMultiplexer::open: Vending master " << master->index();
-#endif
+ dbgln<debug_ptmx>("PTYMultiplexer::open: Vending master {}", master->index());
auto description = FileDescription::create(move(master));
if (!description.is_error()) {
description.value()->set_rw_mode(options);
@@ -77,9 +74,7 @@ void PTYMultiplexer::notify_master_destroyed(Badge<MasterPTY>, unsigned index)
{
LOCKER(m_lock);
m_freelist.append(index);
-#ifdef PTMX_DEBUG
- dbg() << "PTYMultiplexer: " << index << " added to freelist";
-#endif
+ dbgln<debug_ptmx>("PTYMultiplexer: {} added to freelist", index);
}
}