From 5d5487315fdcc9139cb7ea5693ee056792c273a2 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 30 Mar 2023 11:43:24 +0300 Subject: [PATCH] Kernel: Remove the mount test from VFS --- kernel/include/kernel/FS/VirtualFileSystem.h | 1 - kernel/kernel/FS/VirtualFileSystem.cpp | 20 -------------------- kernel/kernel/kernel.cpp | 2 -- 3 files changed, 23 deletions(-) diff --git a/kernel/include/kernel/FS/VirtualFileSystem.h b/kernel/include/kernel/FS/VirtualFileSystem.h index de7f9435..929f85f2 100644 --- a/kernel/include/kernel/FS/VirtualFileSystem.h +++ b/kernel/include/kernel/FS/VirtualFileSystem.h @@ -18,7 +18,6 @@ namespace Kernel virtual BAN::RefPtr root_inode() override { return m_root_inode; } - BAN::ErrorOr mount_test(); BAN::ErrorOr mount(FileSystem*, BAN::StringView); struct File diff --git a/kernel/kernel/FS/VirtualFileSystem.cpp b/kernel/kernel/FS/VirtualFileSystem.cpp index 6d996886..39d2c39f 100644 --- a/kernel/kernel/FS/VirtualFileSystem.cpp +++ b/kernel/kernel/FS/VirtualFileSystem.cpp @@ -119,26 +119,6 @@ namespace Kernel return {}; } - BAN::ErrorOr VirtualFileSystem::mount_test() - { - for (auto* controller : m_storage_controllers) - { - for (auto* device : controller->devices()) - { - for (auto& partition : device->partitions()) - { - if (partition.label() == "mount-test"sv) - { - auto ext2fs = TRY(Ext2FS::create(partition)); - TRY(mount(ext2fs, "/mnt"sv)); - return {}; - } - } - } - } - return BAN::Error::from_c_string("Could not find mount-test partition"); - } - BAN::ErrorOr VirtualFileSystem::mount(FileSystem* file_system, BAN::StringView path) { auto file = TRY(file_from_absolute_path(path)); diff --git a/kernel/kernel/kernel.cpp b/kernel/kernel/kernel.cpp index 922d0c3c..1343b594 100644 --- a/kernel/kernel/kernel.cpp +++ b/kernel/kernel/kernel.cpp @@ -208,8 +208,6 @@ void init2(void* tty1_ptr) DeviceManager::initialize(); MUST(VirtualFileSystem::initialize()); - if (auto res = VirtualFileSystem::get().mount_test(); res.is_error()) - dwarnln("{}", res.error()); if (auto res = PS2Controller::initialize(); res.is_error()) dprintln("{}", res.error());