diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-01-21 18:49:56 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-22 22:17:39 +0100 |
commit | f64e287b82fceb81c843bdaf6bad4e608330ae60 (patch) | |
tree | c7e326d98481975f97eac54c91bc7d9f24770e9f /Kernel/TTY/SlavePTY.cpp | |
parent | a2601e13088d61b796220dbb1085ec74a3f6d9fd (diff) | |
download | serenity-f64e287b82fceb81c843bdaf6bad4e608330ae60.zip |
Kernel: Make device generate their own names
Besides removing the monolithic DevFSDeviceInode::determine_name()
method, being able to determine a device's name inside the /dev
hierarchy outside of DevFS has its uses.
Diffstat (limited to 'Kernel/TTY/SlavePTY.cpp')
-rw-r--r-- | Kernel/TTY/SlavePTY.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index a4704616dd..401b6b9ed2 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/Kernel/TTY/SlavePTY.cpp @@ -106,6 +106,11 @@ KResult SlavePTY::close() return KSuccess; } +String SlavePTY::device_name() const +{ + return String::formatted("{}", minor()); +} + FileBlockCondition& SlavePTY::block_condition() { return m_master->block_condition(); |