From 76219d593867f6e0c86c9f65ec90c3da18877e2a Mon Sep 17 00:00:00 2001 From: "marcel.braun" Date: Sun, 15 Mar 2026 15:10:49 +0100 Subject: Add basic structure for ext2_filesystem, filesystem and mount --- kernel/filesystem/src/mount.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kernel/filesystem/src/mount.cpp (limited to 'kernel/filesystem/src/mount.cpp') diff --git a/kernel/filesystem/src/mount.cpp b/kernel/filesystem/src/mount.cpp new file mode 100644 index 0000000..6594598 --- /dev/null +++ b/kernel/filesystem/src/mount.cpp @@ -0,0 +1,30 @@ +#include "filesystem/mount.hpp" + +#include "kapi/system.hpp" + +#include "filesystem/filesystem.hpp" + +#include + +namespace filesystem +{ + mount::mount(std::string_view const & path, filesystem * fs) + : m_path(path) + , m_filesystem(fs) + { + if (!m_filesystem) + { + kapi::system::panic("[FILESYSTEM] mount initialized with null filesystem."); + } + } + + auto mount::path() const -> std::string_view + { + return m_path; + } + + auto mount::get_filesystem() const -> filesystem * + { + return m_filesystem; + } +} // namespace filesystem \ No newline at end of file -- cgit v1.2.3