aboutsummaryrefslogtreecommitdiff
path: root/kernel/filesystem/include/filesystem/vfs.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/filesystem/include/filesystem/vfs.hpp')
-rw-r--r--kernel/filesystem/include/filesystem/vfs.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/filesystem/include/filesystem/vfs.hpp b/kernel/filesystem/include/filesystem/vfs.hpp
index 1d95d4a5..9c890446 100644
--- a/kernel/filesystem/include/filesystem/vfs.hpp
+++ b/kernel/filesystem/include/filesystem/vfs.hpp
@@ -3,11 +3,14 @@
#include "devices/device.hpp"
#include "filesystem/custody.hpp"
+#include "filesystem/ext2/ext2_filesystem.hpp"
#include "filesystem/inode.hpp"
#include "filesystem/mount.hpp"
#include "filesystem/open_file_description.hpp"
-#include <array>
+#include <kstd/memory>
+#include <kstd/vector>
+
#include <optional>
#include <string_view>
@@ -26,17 +29,17 @@ namespace filesystem
struct device_node_entry
{
std::string_view name;
- inode node;
+ kstd::shared_ptr<inode> node;
};
vfs() = default;
- auto make_device_node(devices::device * device) -> void;
+ auto make_device_node(kstd::shared_ptr<devices::device> device) -> void;
[[nodiscard]] auto resolve_path(std::string_view path) -> std::optional<custody>;
+ kstd::shared_ptr<ext2::ext2_filesystem> m_root_fs;
std::optional<mount> m_root_mount;
- std::array<mount, 10> m_mounts; // TODO BA-FS26 remove when kstd::vector is available and used
- std::array<std::optional<device_node_entry>, 10>
- m_device_nodes; // TODO BA-FS26 use kstd::vector // TODO BA-FS26 remove again, use
+ // 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
};
} // namespace filesystem