From de4b7d9c21448b2d61a0f7770d654de5718c7438 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Mon, 18 May 2020 21:46:47 +0300 Subject: [PATCH] Kernel: Make FS::block_size a size_t --- Kernel/FileSystem/FileSystem.cpp | 2 +- Kernel/FileSystem/FileSystem.h | 6 +++--- Kernel/FileSystem/ProcFS.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp index 021da73153b..817bf09c6b4 100644 --- a/Kernel/FileSystem/FileSystem.cpp +++ b/Kernel/FileSystem/FileSystem.cpp @@ -107,7 +107,7 @@ void FS::lock_all() } } -void FS::set_block_size(int block_size) +void FS::set_block_size(size_t block_size) { ASSERT(block_size > 0); if (block_size == m_block_size) diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h index 4eb70fd89ee..72f809047f8 100644 --- a/Kernel/FileSystem/FileSystem.h +++ b/Kernel/FileSystem/FileSystem.h @@ -85,20 +85,20 @@ public: virtual void flush_writes() {} - int block_size() const { return m_block_size; } + size_t block_size() const { return m_block_size; } virtual bool is_file_backed() const { return false; } protected: FS(); - void set_block_size(int); + void set_block_size(size_t); mutable Lock m_lock { "FS" }; private: unsigned m_fsid { 0 }; - int m_block_size { 0 }; + size_t m_block_size { 0 }; bool m_readonly { false }; }; diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 0b15d7337a1..e157ed72772 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -742,7 +742,7 @@ Optional procfs$df(InodeIdentifier) fs_object.add("total_inode_count", fs.total_inode_count()); fs_object.add("free_inode_count", fs.free_inode_count()); fs_object.add("mount_point", mount.absolute_path()); - fs_object.add("block_size", fs.block_size()); + fs_object.add("block_size", static_cast(fs.block_size())); fs_object.add("readonly", fs.is_readonly()); fs_object.add("mount_flags", mount.flags());