aboutsummaryrefslogtreecommitdiff
path: root/kernel/filesystem/src/mount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/filesystem/src/mount.cpp')
-rw-r--r--kernel/filesystem/src/mount.cpp30
1 files changed, 30 insertions, 0 deletions
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 <string_view>
+
+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