diff options
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/kernel/filesystem/vfs.hpp | 10 |
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 |
