diff options
author | asynts <asynts@gmail.com> | 2021-01-23 23:59:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-25 09:47:36 +0100 |
commit | 8465683dcf1ede4dbab46915113dd2ce4e4b7dfb (patch) | |
tree | 392cdf423fabec6af5550d831e07217fd0e3287b /Kernel/TTY | |
parent | bb483f7ef4693582d34aa7a30fa2916fdcc8b6f4 (diff) | |
download | serenity-8465683dcf1ede4dbab46915113dd2ce4e4b7dfb.zip |
Everywhere: Debug macros instead of constexpr.
This was done with the following script:
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \;
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
Diffstat (limited to 'Kernel/TTY')
-rw-r--r-- | Kernel/TTY/MasterPTY.cpp | 4 | ||||
-rw-r--r-- | Kernel/TTY/PTYMultiplexer.cpp | 4 | ||||
-rw-r--r-- | Kernel/TTY/SlavePTY.cpp | 2 | ||||
-rw-r--r-- | Kernel/TTY/TTY.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index dbb7e0f2da..e3da7a97cb 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -53,7 +53,7 @@ MasterPTY::MasterPTY(unsigned index) MasterPTY::~MasterPTY() { - dbgln<debug_masterpty>("~MasterPTY({})", m_index); + dbgln<MASTERPTY_DEBUG>("~MasterPTY({})", m_index); PTYMultiplexer::the().notify_master_destroyed({}, m_index); } @@ -91,7 +91,7 @@ bool MasterPTY::can_write(const FileDescription&, size_t) const void MasterPTY::notify_slave_closed(Badge<SlavePTY>) { - dbgln<debug_masterpty>("MasterPTY({}): slave closed, my retains: {}, slave retains: {}", m_index, ref_count(), m_slave->ref_count()); + dbgln<MASTERPTY_DEBUG>("MasterPTY({}): slave closed, my retains: {}, slave retains: {}", m_index, ref_count(), m_slave->ref_count()); // +1 ref for my MasterPTY::m_slave // +1 ref for FileDescription::m_device if (m_slave->ref_count() == 2) diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp index 65e0e6339c..4bc9a3a886 100644 --- a/Kernel/TTY/PTYMultiplexer.cpp +++ b/Kernel/TTY/PTYMultiplexer.cpp @@ -61,7 +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)); - dbgln<debug_ptmx>("PTYMultiplexer::open: Vending master {}", master->index()); + dbgln<PTMX_DEBUG>("PTYMultiplexer::open: Vending master {}", master->index()); auto description = FileDescription::create(move(master)); if (!description.is_error()) { description.value()->set_rw_mode(options); @@ -74,7 +74,7 @@ void PTYMultiplexer::notify_master_destroyed(Badge<MasterPTY>, unsigned index) { LOCKER(m_lock); m_freelist.append(index); - dbgln<debug_ptmx>("PTYMultiplexer: {} added to freelist", index); + dbgln<PTMX_DEBUG>("PTYMultiplexer: {} added to freelist", index); } } diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index 401b6b9ed2..eef04946ef 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/Kernel/TTY/SlavePTY.cpp @@ -47,7 +47,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index) SlavePTY::~SlavePTY() { - dbgln<debug_slavepty>("~SlavePTY({})", m_index); + dbgln<SLAVEPTY_DEBUG>("~SlavePTY({})", m_index); DevPtsFS::unregister_slave_pty(*this); } diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index ffa73260dc..2bf26617a0 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -304,7 +304,7 @@ void TTY::set_termios(const termios& t) { m_termios = t; - dbgln<debug_tty>("{} set_termios: ECHO={}, ISIG={}, ICANON={}, ECHOE={}, ECHOK={}, ECHONL={}, ISTRIP={}, ICRNL={}, INLCR={}, IGNCR={}", + dbgln<TTY_DEBUG>("{} set_termios: ECHO={}, ISIG={}, ICANON={}, ECHOE={}, ECHOK={}, ECHONL={}, ISTRIP={}, ICRNL={}, INLCR={}, IGNCR={}", tty_name(), should_echo_input(), should_generate_signals(), |