aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/include/kernel/filesystem/vfs.hpp5
-rw-r--r--kernel/src/filesystem/vfs.cpp6
2 files changed, 5 insertions, 6 deletions
diff --git a/kernel/include/kernel/filesystem/vfs.hpp b/kernel/include/kernel/filesystem/vfs.hpp
index e6f2327..bbafa4f 100644
--- a/kernel/include/kernel/filesystem/vfs.hpp
+++ b/kernel/include/kernel/filesystem/vfs.hpp
@@ -35,6 +35,8 @@ namespace kernel::filesystem
invalid_filesystem = -5
};
+ vfs();
+
/**
@brief Initialize the virtual filesystem.
@warning Panics if the VFS has already been initialized.
@@ -83,9 +85,6 @@ namespace kernel::filesystem
auto unmount(std::string_view path) -> operation_result;
private:
- vfs() = default;
- auto init_internal() -> void;
-
/**
* Note: Resolving a dentry requires traversing mount points; since the
* associated 'mount' object is discovered as a byproduct of this
diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp
index c297210..91afc13 100644
--- a/kernel/src/filesystem/vfs.cpp
+++ b/kernel/src/filesystem/vfs.cpp
@@ -45,12 +45,12 @@ namespace kernel::filesystem
kapi::system::panic("[FILESYSTEM] vfs has already been initialized.");
}
- active_vfs.emplace(vfs{});
- active_vfs->init_internal();
+ active_vfs.emplace();
}
- auto vfs::init_internal() -> void
+ vfs::vfs()
{
+ // Register all compiled-in filesystems
auto type_descriptors = std::span{&__start_vfs_type_descriptors, &__stop_vfs_type_descriptors} |
std::views::filter([](auto p) { return p != nullptr; });
std::ranges::for_each(type_descriptors, [](auto descriptor) {