diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-04 16:27:52 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-04 18:17:16 +0200 |
commit | 58feebeed28bab04e7b462f7cd3beb81984f116e (patch) | |
tree | 7bfbab024632cb8174cdf7e61813598dcd115b77 /Kernel/TTY | |
parent | cb1fcd3eaf964832417cafd4df981f77be3697ad (diff) | |
download | serenity-58feebeed28bab04e7b462f7cd3beb81984f116e.zip |
Kernel+LibC: Tidy up sys$ttyname() and sys$ptsname()
- Remove goofy _r suffix from syscall names.
- Don't take a signed buffer size.
- Use Userspace<T>.
- Make TTY::tty_name() return a String instead of a StringView.
Diffstat (limited to 'Kernel/TTY')
-rw-r--r-- | Kernel/TTY/SlavePTY.cpp | 2 | ||||
-rw-r--r-- | Kernel/TTY/SlavePTY.h | 2 | ||||
-rw-r--r-- | Kernel/TTY/TTY.h | 2 | ||||
-rw-r--r-- | Kernel/TTY/VirtualConsole.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index 5a3a48dcae..5131c9ae77 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/Kernel/TTY/SlavePTY.cpp @@ -54,7 +54,7 @@ SlavePTY::~SlavePTY() DevPtsFS::unregister_slave_pty(*this); } -StringView SlavePTY::tty_name() const +String SlavePTY::tty_name() const { return m_tty_name; } diff --git a/Kernel/TTY/SlavePTY.h b/Kernel/TTY/SlavePTY.h index 0e22a362ba..3d7e550e05 100644 --- a/Kernel/TTY/SlavePTY.h +++ b/Kernel/TTY/SlavePTY.h @@ -42,7 +42,7 @@ public: private: // ^TTY - virtual StringView tty_name() const override; + virtual String tty_name() const override; virtual ssize_t on_tty_write(const u8*, ssize_t) override; virtual void echo(u8) override; diff --git a/Kernel/TTY/TTY.h b/Kernel/TTY/TTY.h index 7e7470fa8e..46268000ce 100644 --- a/Kernel/TTY/TTY.h +++ b/Kernel/TTY/TTY.h @@ -46,7 +46,7 @@ public: virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override final; virtual String absolute_path(const FileDescription&) const override { return tty_name(); } - virtual StringView tty_name() const = 0; + virtual String tty_name() const = 0; unsigned short rows() const { return m_rows; } unsigned short columns() const { return m_columns; } diff --git a/Kernel/TTY/VirtualConsole.h b/Kernel/TTY/VirtualConsole.h index 5d7c3dcf3a..b6a04587fb 100644 --- a/Kernel/TTY/VirtualConsole.h +++ b/Kernel/TTY/VirtualConsole.h @@ -55,7 +55,7 @@ private: // ^TTY virtual ssize_t on_tty_write(const u8*, ssize_t) override; - virtual StringView tty_name() const override { return m_tty_name; } + virtual String tty_name() const override { return m_tty_name; } virtual void echo(u8) override; // ^TerminalClient |