1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

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.
This commit is contained in:
asynts 2021-01-15 00:18:55 +01:00 committed by Andreas Kling
parent a348ab55b0
commit 7b0a1a98d9
12 changed files with 81 additions and 71 deletions

View file

@ -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);
}
}