aboutsummaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-20 22:13:36 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-26 21:17:28 +0100
commita396b71827a24f9d6c8010fd85b9afd9d86b6e2a (patch)
treef6ebaf2fa7b2e977eb95ec01a9c123ea665b55f5 /kernel/include
parentb02b90f21de5954aef34eb37a17775f194b8de39 (diff)
downloadteachos-a396b71827a24f9d6c8010fd85b9afd9d86b6e2a.tar.xz
teachos-a396b71827a24f9d6c8010fd85b9afd9d86b6e2a.zip
implement first draft of a do_mount function
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/kernel/filesystem/vfs.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/include/kernel/filesystem/vfs.hpp b/kernel/include/kernel/filesystem/vfs.hpp
index a2894a6..2ad570b 100644
--- a/kernel/include/kernel/filesystem/vfs.hpp
+++ b/kernel/include/kernel/filesystem/vfs.hpp
@@ -3,7 +3,7 @@
#include "kernel/devices/device.hpp"
#include "kernel/filesystem/custody.hpp"
-#include "kernel/filesystem/ext2/ext2_filesystem.hpp"
+#include "kernel/filesystem/filesystem.hpp"
#include "kernel/filesystem/inode.hpp"
#include "kernel/filesystem/mount.hpp"
#include "kernel/filesystem/open_file_description.hpp"
@@ -24,22 +24,24 @@ namespace filesystem
~vfs() = default;
auto open(std::string_view path) -> std::optional<open_file_description>;
+ auto do_mount(std::string_view path, kstd::shared_ptr<filesystem> const & filesystem) -> int;
private:
+ // TODO BA-FS26 remove again and use devtempfs
struct device_node_entry
{
std::string_view name;
kstd::shared_ptr<inode> node;
};
+ kstd::vector<std::optional<device_node_entry>> m_device_nodes; // TODO BA-FS26 remove again, use devtempfs
vfs() = default;
auto make_device_node(kstd::shared_ptr<devices::device> const & device) -> void;
[[nodiscard]] auto resolve_path(std::string_view path) -> std::optional<custody>;
- kstd::shared_ptr<ext2::ext2_filesystem> m_root_fs;
+ kstd::shared_ptr<filesystem> m_root_fs;
std::optional<mount> m_root_mount;
- // kstd::vector<mount> m_mounts; // TODO BA-FS26 really needed?
- kstd::vector<std::optional<device_node_entry>> m_device_nodes; // TODO BA-FS26 remove again, use devtempfs
+ kstd::vector<mount> m_mounts;
};
} // namespace filesystem