diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-03-17 13:18:51 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-17 23:22:42 +0100 |
commit | b05b4d4b249e7f0025ddf27544c1972e32af80c8 (patch) | |
tree | a4437fdb7b200fa19b6f5368f0b894761fd2ab09 /Kernel/TTY | |
parent | 999c57ef2dffb36e15c51aa99d4921122caad6ee (diff) | |
download | serenity-b05b4d4b249e7f0025ddf27544c1972e32af80c8.zip |
Kernel: Refactor storage stack with u64 as file operations offset
Diffstat (limited to 'Kernel/TTY')
-rw-r--r-- | Kernel/TTY/MasterPTY.cpp | 4 | ||||
-rw-r--r-- | Kernel/TTY/MasterPTY.h | 4 | ||||
-rw-r--r-- | Kernel/TTY/PTYMultiplexer.h | 4 | ||||
-rw-r--r-- | Kernel/TTY/SlavePTY.cpp | 2 | ||||
-rw-r--r-- | Kernel/TTY/SlavePTY.h | 2 | ||||
-rw-r--r-- | Kernel/TTY/TTY.cpp | 4 | ||||
-rw-r--r-- | Kernel/TTY/TTY.h | 4 |
7 files changed, 12 insertions, 12 deletions
diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index 791541e275..bffbd4a871 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -62,14 +62,14 @@ String MasterPTY::pts_name() const return m_pts_name; } -KResultOr<size_t> MasterPTY::read(FileDescription&, size_t, UserOrKernelBuffer& buffer, size_t size) +KResultOr<size_t> MasterPTY::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size) { if (!m_slave && m_buffer.is_empty()) return 0; return m_buffer.read(buffer, size); } -KResultOr<size_t> MasterPTY::write(FileDescription&, size_t, const UserOrKernelBuffer& buffer, size_t size) +KResultOr<size_t> MasterPTY::write(FileDescription&, u64, const UserOrKernelBuffer& buffer, size_t size) { if (!m_slave) return EIO; diff --git a/Kernel/TTY/MasterPTY.h b/Kernel/TTY/MasterPTY.h index 8c2bb54739..c172d64275 100644 --- a/Kernel/TTY/MasterPTY.h +++ b/Kernel/TTY/MasterPTY.h @@ -54,8 +54,8 @@ public: private: // ^CharacterDevice - virtual KResultOr<size_t> read(FileDescription&, size_t, UserOrKernelBuffer&, size_t) override; - virtual KResultOr<size_t> write(FileDescription&, size_t, const UserOrKernelBuffer&, size_t) override; + virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override; + virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override; virtual bool can_read(const FileDescription&, size_t) const override; virtual bool can_write(const FileDescription&, size_t) const override; virtual KResult close() override; diff --git a/Kernel/TTY/PTYMultiplexer.h b/Kernel/TTY/PTYMultiplexer.h index 79a6f1d2bf..4ef2d32cb5 100644 --- a/Kernel/TTY/PTYMultiplexer.h +++ b/Kernel/TTY/PTYMultiplexer.h @@ -48,8 +48,8 @@ public: // ^CharacterDevice virtual KResultOr<NonnullRefPtr<FileDescription>> open(int options) override; - virtual KResultOr<size_t> read(FileDescription&, size_t, UserOrKernelBuffer&, size_t) override { return 0; } - virtual KResultOr<size_t> write(FileDescription&, size_t, const UserOrKernelBuffer&, size_t) override { return 0; } + virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override { return 0; } + virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override { return 0; } virtual bool can_read(const FileDescription&, size_t) const override { return true; } virtual bool can_write(const FileDescription&, size_t) const override { return true; } diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index 5c7b93d2eb..f9a081fb8b 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/Kernel/TTY/SlavePTY.cpp @@ -93,7 +93,7 @@ bool SlavePTY::can_read(const FileDescription& description, size_t offset) const return TTY::can_read(description, offset); } -KResultOr<size_t> SlavePTY::read(FileDescription& description, size_t offset, UserOrKernelBuffer& buffer, size_t size) +KResultOr<size_t> SlavePTY::read(FileDescription& description, u64 offset, UserOrKernelBuffer& buffer, size_t size) { if (m_master->is_closed()) return 0; diff --git a/Kernel/TTY/SlavePTY.h b/Kernel/TTY/SlavePTY.h index 4fd889ed9b..4b075e1c60 100644 --- a/Kernel/TTY/SlavePTY.h +++ b/Kernel/TTY/SlavePTY.h @@ -52,7 +52,7 @@ private: // ^CharacterDevice virtual bool can_read(const FileDescription&, size_t) const override; - virtual KResultOr<size_t> read(FileDescription&, size_t, UserOrKernelBuffer&, size_t) override; + virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override; virtual bool can_write(const FileDescription&, size_t) const override; virtual const char* class_name() const override { return "SlavePTY"; } virtual KResult close() override; diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index e3fcf469af..f7facde2b3 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -52,7 +52,7 @@ void TTY::set_default_termios() memcpy(m_termios.c_cc, default_cc, sizeof(default_cc)); } -KResultOr<size_t> TTY::read(FileDescription&, size_t, UserOrKernelBuffer& buffer, size_t size) +KResultOr<size_t> TTY::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size) { if (Process::current()->pgid() != pgid()) { // FIXME: Should we propagate this error path somehow? @@ -100,7 +100,7 @@ KResultOr<size_t> TTY::read(FileDescription&, size_t, UserOrKernelBuffer& buffer return (size_t)nwritten; } -KResultOr<size_t> TTY::write(FileDescription&, size_t, const UserOrKernelBuffer& buffer, size_t size) +KResultOr<size_t> TTY::write(FileDescription&, u64, const UserOrKernelBuffer& buffer, size_t size) { if (m_termios.c_lflag & TOSTOP && Process::current()->pgid() != pgid()) { [[maybe_unused]] auto rc = Process::current()->send_signal(SIGTTOU, nullptr); diff --git a/Kernel/TTY/TTY.h b/Kernel/TTY/TTY.h index a60526078c..404ad2f755 100644 --- a/Kernel/TTY/TTY.h +++ b/Kernel/TTY/TTY.h @@ -39,8 +39,8 @@ class TTY : public CharacterDevice { public: virtual ~TTY() override; - virtual KResultOr<size_t> read(FileDescription&, size_t, UserOrKernelBuffer&, size_t) override; - virtual KResultOr<size_t> write(FileDescription&, size_t, const UserOrKernelBuffer&, size_t) override; + virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override; + virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override; virtual bool can_read(const FileDescription&, size_t) const override; virtual bool can_write(const FileDescription&, size_t) const override; virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override final; |