diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-16 02:11:50 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-16 02:11:50 +0100 |
commit | 310a5f41997492d203fed6dd7b4ff77ce80f82ff (patch) | |
tree | 9958136053756379e54bf2e74cc9795547f5723d /Kernel/MasterPTY.cpp | |
parent | 9c51d9dfcd990ec4bc1707f8c17ee0fd1059d8f0 (diff) | |
download | serenity-310a5f41997492d203fed6dd7b4ff77ce80f82ff.zip |
Let each MasterPTY create its slave.
Diffstat (limited to 'Kernel/MasterPTY.cpp')
-rw-r--r-- | Kernel/MasterPTY.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/MasterPTY.cpp b/Kernel/MasterPTY.cpp index 138d9bc5b0..7cb6f8b687 100644 --- a/Kernel/MasterPTY.cpp +++ b/Kernel/MasterPTY.cpp @@ -3,9 +3,10 @@ MasterPTY::MasterPTY(unsigned index) : CharacterDevice(10, index) + , m_slave(*new SlavePTY(*this, index)) , m_index(index) { - + VFS::the().register_character_device(m_slave); } MasterPTY::~MasterPTY() @@ -14,7 +15,6 @@ MasterPTY::~MasterPTY() String MasterPTY::pts_name() const { - dbgprintf("MasterPTY::pts_name requested for index %u!\n", m_index); char buffer[32]; ksprintf(buffer, "/dev/pts%u", m_index); return buffer; @@ -27,7 +27,7 @@ ssize_t MasterPTY::read(Process&, byte* buffer, size_t size) ssize_t MasterPTY::write(Process&, const byte* buffer, size_t size) { - m_slave->on_master_write(buffer, size); + m_slave.on_master_write(buffer, size); return size; } |