summaryrefslogtreecommitdiff
path: root/Kernel/TTY/TTY.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-15 21:29:01 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-22 22:14:30 +0100
commit27bc48e06cf54cb826fd8dd46edd9331650f3a63 (patch)
treee0ac1a4e471a1bc9551376fdb576a60a87205eb8 /Kernel/TTY/TTY.cpp
parent7b0a1a98d9edc5ae91df9138b695fb2bb3ead4b7 (diff)
downloadserenity-27bc48e06cf54cb826fd8dd46edd9331650f3a63.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/TTY.cpp')
-rw-r--r--Kernel/TTY/TTY.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index b7425f9b56..2ffcdaefb3 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/Debug.h>
#include <AK/ScopeGuard.h>
#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
@@ -304,19 +305,19 @@ void TTY::flush_input()
void TTY::set_termios(const termios& t)
{
m_termios = t;
-#ifdef TTY_DEBUG
- dbg() << tty_name() << " set_termios: "
- << "ECHO=" << should_echo_input()
- << ", ISIG=" << should_generate_signals()
- << ", ICANON=" << in_canonical_mode()
- << ", ECHOE=" << ((m_termios.c_lflag & ECHOE) != 0)
- << ", ECHOK=" << ((m_termios.c_lflag & ECHOK) != 0)
- << ", ECHONL=" << ((m_termios.c_lflag & ECHONL) != 0)
- << ", ISTRIP=" << ((m_termios.c_iflag & ISTRIP) != 0)
- << ", ICRNL=" << ((m_termios.c_iflag & ICRNL) != 0)
- << ", INLCR=" << ((m_termios.c_iflag & INLCR) != 0)
- << ", IGNCR=" << ((m_termios.c_iflag & IGNCR) != 0);
-#endif
+
+ dbgln<debug_tty>("{} set_termios: ECHO={}, ISIG={}, ICANON={}, ECHOE={}, ECHOK={}, ECHONL={}, ISTRIP={}, ICRNL={}, INLCR={}, IGNCR={}",
+ tty_name(),
+ should_echo_input(),
+ should_generate_signals(),
+ in_canonical_mode(),
+ ((m_termios.c_lflag & ECHOE) != 0),
+ ((m_termios.c_lflag & ECHOK) != 0),
+ ((m_termios.c_lflag & ECHONL) != 0),
+ ((m_termios.c_iflag & ISTRIP) != 0),
+ ((m_termios.c_iflag & ICRNL) != 0),
+ ((m_termios.c_iflag & INLCR) != 0),
+ ((m_termios.c_iflag & IGNCR) != 0));
}
int TTY::ioctl(FileDescription&, unsigned request, FlatPtr arg)