diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-02 10:04:04 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-04-11 07:58:20 +0200 |
| commit | 1dcf253fdf8169a3b2b71bfac68f2f25951af1a8 (patch) | |
| tree | 2002a070bef79a9e719831a60b00283e66d276f1 /kernel/src/filesystem/ext2/filesystem.cpp | |
| parent | 93bca4c2a7c1852fc89df6965c835a7dbbdd6512 (diff) | |
| download | teachos-1dcf253fdf8169a3b2b71bfac68f2f25951af1a8.tar.xz teachos-1dcf253fdf8169a3b2b71bfac68f2f25951af1a8.zip | |
fix build, refactoring
Diffstat (limited to 'kernel/src/filesystem/ext2/filesystem.cpp')
| -rw-r--r-- | kernel/src/filesystem/ext2/filesystem.cpp | 27 |
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)); |
