diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-03-18 22:57:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-19 09:15:19 +0100 |
commit | 6698fd84fff34f9fb2dec78c20519b5c89b2c8f9 (patch) | |
tree | 67631de5cb5b4a950d8bb9a244bf446e674ce151 /Kernel/FileSystem | |
parent | 0d8c9024eec12d57270cca1cf6bfc7d03c0ca229 (diff) | |
download | serenity-6698fd84fff34f9fb2dec78c20519b5c89b2c8f9.zip |
Kernel: Refactor storage stack with u64 as mmap offset
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/AnonymousFile.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/AnonymousFile.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/File.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/File.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/FileDescription.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/FileDescription.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/InodeFile.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/InodeFile.h | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/FileSystem/AnonymousFile.cpp b/Kernel/FileSystem/AnonymousFile.cpp index 82a5669f84..23cf376614 100644 --- a/Kernel/FileSystem/AnonymousFile.cpp +++ b/Kernel/FileSystem/AnonymousFile.cpp @@ -39,7 +39,7 @@ AnonymousFile::~AnonymousFile() { } -KResultOr<Region*> AnonymousFile::mmap(Process& process, FileDescription&, const Range& range, size_t offset, int prot, bool shared) +KResultOr<Region*> AnonymousFile::mmap(Process& process, FileDescription&, const Range& range, u64 offset, int prot, bool shared) { if (offset != 0) return EINVAL; diff --git a/Kernel/FileSystem/AnonymousFile.h b/Kernel/FileSystem/AnonymousFile.h index 51455db60e..3e57c5601b 100644 --- a/Kernel/FileSystem/AnonymousFile.h +++ b/Kernel/FileSystem/AnonymousFile.h @@ -39,7 +39,7 @@ public: virtual ~AnonymousFile() override; - virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared) override; + virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared) override; private: virtual const char* class_name() const override { return "AnonymousFile"; } diff --git a/Kernel/FileSystem/File.cpp b/Kernel/FileSystem/File.cpp index fcf1f99075..ed141ff1d6 100644 --- a/Kernel/FileSystem/File.cpp +++ b/Kernel/FileSystem/File.cpp @@ -59,7 +59,7 @@ int File::ioctl(FileDescription&, unsigned, FlatPtr) return -ENOTTY; } -KResultOr<Region*> File::mmap(Process&, FileDescription&, const Range&, size_t, int, bool) +KResultOr<Region*> File::mmap(Process&, FileDescription&, const Range&, u64, int, bool) { return ENODEV; } diff --git a/Kernel/FileSystem/File.h b/Kernel/FileSystem/File.h index 38aac0a62c..c8bd71725b 100644 --- a/Kernel/FileSystem/File.h +++ b/Kernel/FileSystem/File.h @@ -114,7 +114,7 @@ public: virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) = 0; virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) = 0; virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg); - virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared); + virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared); virtual KResult stat(::stat&) const { return EBADF; } virtual String absolute_path(const FileDescription&) const = 0; diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp index f66811d450..c499b0daa7 100644 --- a/Kernel/FileSystem/FileDescription.cpp +++ b/Kernel/FileSystem/FileDescription.cpp @@ -327,7 +327,7 @@ InodeMetadata FileDescription::metadata() const return {}; } -KResultOr<Region*> FileDescription::mmap(Process& process, const Range& range, size_t offset, int prot, bool shared) +KResultOr<Region*> FileDescription::mmap(Process& process, const Range& range, u64 offset, int prot, bool shared) { LOCKER(m_lock); return m_file->mmap(process, *this, range, offset, prot, shared); diff --git a/Kernel/FileSystem/FileDescription.h b/Kernel/FileSystem/FileDescription.h index 2b340b11d3..df9fda57a7 100644 --- a/Kernel/FileSystem/FileDescription.h +++ b/Kernel/FileSystem/FileDescription.h @@ -108,7 +108,7 @@ public: Custody* custody() { return m_custody.ptr(); } const Custody* custody() const { return m_custody.ptr(); } - KResultOr<Region*> mmap(Process&, const Range&, size_t offset, int prot, bool shared); + KResultOr<Region*> mmap(Process&, const Range&, u64 offset, int prot, bool shared); bool is_blocking() const { return m_is_blocking; } void set_blocking(bool b) { m_is_blocking = b; } diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp index 4c13865f08..9dfe97495d 100644 --- a/Kernel/FileSystem/InodeFile.cpp +++ b/Kernel/FileSystem/InodeFile.cpp @@ -107,7 +107,7 @@ int InodeFile::ioctl(FileDescription& description, unsigned request, FlatPtr arg } } -KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& description, const Range& range, size_t offset, int prot, bool shared) +KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& description, const Range& range, u64 offset, int prot, bool shared) { // FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec. RefPtr<InodeVMObject> vmobject; diff --git a/Kernel/FileSystem/InodeFile.h b/Kernel/FileSystem/InodeFile.h index e00dfc8d67..a145d870fe 100644 --- a/Kernel/FileSystem/InodeFile.h +++ b/Kernel/FileSystem/InodeFile.h @@ -50,7 +50,7 @@ public: virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override; virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override; virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override; - virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared) override; + virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared) override; virtual String absolute_path(const FileDescription&) const override; |