aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/ext2/filesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/filesystem/ext2/filesystem.cpp')
-rw-r--r--kernel/src/filesystem/ext2/filesystem.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/kernel/src/filesystem/ext2/filesystem.cpp b/kernel/src/filesystem/ext2/filesystem.cpp
index a3425b5..0ebb243 100644
--- a/kernel/src/filesystem/ext2/filesystem.cpp
+++ b/kernel/src/filesystem/ext2/filesystem.cpp
@@ -5,6 +5,7 @@
#include "kernel/devices/block_device_utils.hpp"
#include "kernel/filesystem/ext2/inode.hpp"
#include "kernel/filesystem/ext2/superblock.hpp"
+#include "kernel/filesystem/filesystem.hpp"
#include "kernel/filesystem/inode.hpp"
#include <kstd/memory>
@@ -21,23 +22,23 @@ namespace kernel::filesystem::ext2
constexpr uint16_t EXT2_MAGIC = 0xEF53;
// Mode bits
- constexpr uint16_t S_IFMT = 0xF000;
- constexpr uint16_t S_IFREG = 0x8000;
- constexpr uint16_t S_IFDIR = 0x4000;
-
- auto S_ISREG(uint16_t mode) -> bool
- {
- return (mode & S_IFMT) == S_IFREG;
- }
- auto S_ISDIR(uint16_t mode) -> bool
- {
- return (mode & S_IFMT) == S_IFDIR;
- }
+ // constexpr uint16_t S_IFMT = 0xF000;
+ // constexpr uint16_t S_IFREG = 0x8000;
+ // constexpr uint16_t S_IFDIR = 0x4000;
+
+ // auto S_ISREG(uint16_t mode) -> bool
+ // {
+ // return (mode & S_IFMT) == S_IFREG;
+ // }
+ // auto S_ISDIR(uint16_t mode) -> bool
+ // {
+ // return (mode & S_IFMT) == S_IFDIR;
+ // }
} // namespace
auto filesystem::mount(kstd::shared_ptr<kapi::devices::device> const & device) -> int
{
- m_device = device;
+ kernel::filesystem::filesystem::mount(device);
kernel::devices::block_device_utils::read(m_device, &m_superblock, SUPERBLOCK_OFFSET, sizeof(m_superblock));